Napoleon rose to power in France in the late 18th century due to his military talent and intelligence. He established the French Consulate and appointed himself as First Consul, consolidating political power. In 1804, Napoleon established the Napoleonic Code, which standardized French law and eliminated many feudal privileges. Napoleon then embarked on a series of military campaigns across Europe, becoming Emperor of France. However, his need for total control and exhaustion from continuous warfare led to his downfall, as he faced defeats at the hands of British and Russian forces. Napoleon was eventually exiled and the Congress of Vienna established a new balance of power to prevent another leader like Napoleon from gaining dominance over Europe.