In 1799, the French government of the Thermidorean Reaction, called the Directory, was foundering. A brilliant young French general, having already won fame with a series of victories for Revolutionary France in Italy Napoleon Bonaparte, was then busy fighting a fruitless war in Egypt. Hearing of the chaos, Napoleon abandoned his army and with geat fanfare returned to Paris a hero. On November 9, 1799 (the month of "Brumaire" in the French Revolutionary calendar) Napoleon Bonaparte and Abbe Sieyes pulled off a coup in France. They overthrew the current Directory and replaced it with a new government: the Consulate. Sieyes and Napoleon both installed themselves as consuls, though the popular Napoleon became First Consul.
A career warrior, Napoleon now claimed he only wanted peace. At the time, Austria was the only continental country that remained at war with France. On June 1800, Napoleon led the French army against the Austrians at the battle of Marengo and emerged with a staggering victory. In February 1801, the Austrians were forced to sign the Treaty of Luneville, reaffirming the earlier Treaty of Campo Formio, which had created the Cisalpine Republic in Italy. The Cisalpine Republic was really a puppet-state controlled by France. On March 1802, France signed the Peace of Amiens with Britain, ending their warring, and briefly bringing Europe to peace, a rare occurrence in this violent period.
As First Consul, Napoleon moved rapidly to institute order in France. He put down rebellions in the French provinces. He created a secret police, led by Fouche. He centralized the government of the various French departments under a system of prefects. To reduce the number of potential revolutionaries floating around Europe, he issued a general amnesty, allowing various exiles, from aristocrats to Jacobins, to return home. Napoleon ended the exclusion of the nobility from power that had been the trademark of earlier post- revolution regimes. He simply wanted the best men he could find, even if they happened to be from aristocratic families. As an example, he took in Talleyrand as his foreign minister despite Talleyrand's aristocratic heritage.
Napoleon was not universally loved, however. On Christmas Eve, 1800, he was nearly killed by a bomb planted by conspirators wanting to restore the old Bourbon line of kings. Although it was clear that the plot had been royalist in origin, Napoleon felt more threatened by the Jacobins and used the event to persecute and intimidate them.
Though unreligious, in 1801, Napoleon signed a Concordat with the Catholic pope. This agreement smoothed over the rift between France and Rome the Revolution had caused, in which the French state assumed control over appointment of bishops and confiscated church lands. Napoleon did not give the property back, but he did make Catholicism the official religion of France, admitting, "the majority of France is Catholic." In exchange, the Vatican recognized the Consulate. Even under this new agreement with the Church, Napoleon upheld religious tolerance, which remained a fundamental principle of French life under his "enlightened despotism."
Napoleon also set about improving and modernizing French government. He wanted government power to apply to everyone equally, legal class differences and hereditary government offices to be abolished, and salaries to be given to his bureaucrats, who were to be selected based on talent, not birth. Napoleon stabilized French currency by creating the Bank of France, and he simplified the tangle of French law by producing the Napoleonic Code.