Determined now to abandon his army in Egypt, Napoleon describes to his generals the danger in which France stands and the need for him to hurry home. He does not share with them a more personal reason. Rumour has reached him that one of the Directors, Sieyès, has been looking for a general to support him in a coup d'état. If that general is anyone other than Napoleon, he may have lost his chance for good.

With a few colleagues he leaves Egypt in two frigates on August 23. By good luck they complete the journey unnoticed by any of the British squadrons in the Mediterranean. They land at Fréjus on October 9. Napoleon reaches Paris a week later.

Napoleon at first conceals his hand, pretending merely to enjoy the social delights of Paris. But within a couple of weeks he is actively engaged in planning a coup.

A false rumour about an imminent Jacobin plot against the Directory is the first step. This is used, on 18 Brumaire, to persuade the senior of the nation's two councils (the Ancients) to appoint Napoleon commander of all the troops in Paris. The Ancients are also induced to vote that they and the junior chamber (the Council of the Five Hundred) shall move for safety to Saint-Cloud, where they will convene on the following day.

The conspirators meanwhile place under house arrest those Directors who are not in the plot, falsely announcing that they have resigned.

On the next day the Ancients and the Five Hundred, assembling at Saint-Cloud, find themselves surrounded by 6000 troops. Tense debate continues in both assemblies until Napoleon impatiently bursts in upon them. His illegal intrusion causes uproar, from which he emerges visibly shaken. Further deception is needed. The troops are told that there are assassins among the deputies who have attempted to murder Napoleon. They empty the two halls by force. The deputies flee for their lives.

Later that night a quorum from both the Ancients and the Five Hundred is rounded up. The terrified and exhausted deputies are persuaded - at about 2 a.m. - to pass a motion formally ending the Directory and swearing an oath of loyalty to a new provisional consulate of three men.

This provisional trio of consuls consists of two of the previous five directors, Sieyès and Roger Ducos (both of them party to the plot), and one newcomer - Napoleon Bonaparte. Over the next month an appointed committee wrangles ceaselessly about the terms of a new constitution for the proposed consulate. Sieyès and Ducos, browbeaten by Napoleon, drop out of the running.

On December 12 a constitutional document drafted by Napoleon is finally accepted. It provides for an executive first consul who will be supported by advisory second and third consuls and 'checked' by no less than four assemblies with differing functions.

It is a calculated recipe for inertia and muddle at all levels but the very highest, where the first consul will - in effect though not in theory - have virtually unlimited power. It is no surprise that the first consul is to be Napoleon, with a Jacobin and a royalist selected as second and third consuls to appease both factions by a continuation of this well established balancing act.

The proposed package is put to the nation in a referendum (in February 1800) asking for a simple Yes or No. With a franchise limited by property qualifications, and without a secret ballot, the result nationally is 3,011,007 voting Yes (meaning for Napoleon) and only 1562 registering No.

After ten years of upheaval and terror the French are ready to accept dictatorial rule by a man who is decisive and undoctrinaire, professionally equipped to direct France's wars against her many enemies, sympathetic to the principles of the revolution (as his early career has proved) and yet inclined to safeguard people's resulting windfalls. Napoleon and the times are well suited to each other.

First Consul: 1800-1804

The plebiscite of 1800 gives Napoleon the mandate to play a role for which he is well suited both in character and in terms of his 18th-century education - that of the enlightened despot.

He now has the power, like a monarch, to select the members of the council of state over which he presides. As in a king's privy council, these councillors specialize in different departments of state. They give their advice. But on any important issue it is the first consul who makes the executive decision.

With these powers, Napoleon sets about a thorough reform of France's administrative systems. Despotism and enlightenment are carefully balanced. Censorship of the press is introduced, but so are measures to improve secondary and university education. Police powers are strengthened and judges are now appointed (previously they were elected), yet the judges are given an important new independence in the form of security of tenure.

Similarly the pragmatic first consul, himself indifferent to religion, is well aware that much of rural France deeply resents the French republic's attack on Catholicism. Napoleon sets about mending this fence.

The estrangement from Rome has recently been absolute. Pope Pius VI, humiliated by the French, is a prisoner in France when he dies in August 1799. Napoleon now makes overtures to his successor, Pius VII.

In a Concordat agreed in July 1801, the pope accepts that Napoleon will appoint French bishops (an argument between church and state which goes all the way back to the investiture controversy in the Middle Ages) and that church lands seized during the revolution will not be restored. In return Napoleon agrees to pay the salaries of the clergy and to recognize Catholicism as the religion of the majority of the French people.

Napoleon has a trick up his sleeve to make the Concordat acceptable to French republicans. He unilaterally adds the so-called 'organic articles', requiring government permission for any papal action or pronouncement on French soil. The pope is outraged by this deception. But the Concordat serves its purpose in appeasing religious sensibilities within France.

The most famous and lasting of Napoleon's reforms during the consulate is his code of civil law. Since 1790 there have been several attempts to codify French law - chaotic in its ancien régime form and made more so by a flood of revolutionary legislation.

In 1800 Napoleon appoints a committee of lawyers to work on the preparation of a code. He himself takes a keen interest, attending more than half the meetings in which their proposals are discussed. Statutes are enacted piecemeal from as early as 1801. By 1804 they are ready to be embodied in a single Code Civil, which in 1807 is renamed the Code Napoléon.

The change of name reflects Napoleon's ever-growing stature in France. In 1802 the people are asked 'Shall Napoleon Bonaparte be consul for life?' As in 1800, the vast majority say Yes. For good measure it is agreed that he can designate his successor. This vote of confidence follows his achievement of peace with France's two main enemies, first Austria and then Britain.

Napoleon against Austria: 1800-1801

Napoleon's military priority, on becoming first consul in 1799, is to reverse gains recently made by Austria during his absence on the Egyptian campaign. To give himself a freer hand he makes a tentative offer of peace to England in December 1799, but it is firmly rejected.

As in 1796, the Austrians could be attacked by French armies either north of the Alps in Germany or south of them in Italy. No doubt remembering his own triumphs in that year, Napoleon selects Italy. He hopes to surprise the enemy by bringing his army south through the Great St Bernard pass in May 1800 before the snows have cleared. He himself slithers through the pass on a mule, but this does not deter the painter Jacques-Louis David from depicting him on a magnificent rearing stallion among the snowy peaks.

When the crucial encounter with the Austrians occurs, at Marengo on June 14, it is very nearly a disaster for Napoleon. By mid-afternoon it seems that the Austrians have won the day. But a brave French counter-attack reverses the situation.

Victory at Marengo is followed by an armistice and a truce - which Napoleon breaches in November, when he sends a French army north of the Alps against Vienna. Another French victory, at Hohenlinden in December, prompts the Austrian emperor to sign a treaty at Lunéville in February 1801. It goes even beyond the terms of Campo Formio. France keeps the Rhineland. Austria recognizes the four French sister republics.

Napoleon against Britain: 1800-1802

The conflict between France and Britain, continuously at war since 1793, tends always towards stalemate. The two nations are evenly matched but have very different strengths. Britain has a much smaller population (11 million compared to 27 million in France in 1801). This disadvantage is offset by Britain's wealth (from a more developed economy and extensive overseas trade) and by the British superiority at sea. In 1803 France has 23 ships of the line; Britain has 34 in service and another 77 in reserve.

For these reasons the British contribution to any war against France in continental Europe is largely limited to providing funds for allied armies.

The naval clash between Britain and France is a strange one - not so much a sea war as a coast war. It is the permanent concern of the British navy, commanding the seas, to harm France and her allies by preventing any merchant ships other than those of Britain from reaching continental ports. And it is the permanent concern of the French armies, commanding the land, to prevent British vessels entering those same ports.

Third parties suffer as much as anyone from this form of economic warfare, particularly after Britain adopts the policy of seizing goods carried by the ships of neutral nations if they are destined for a harbour under blockade.

Indignation at this British policy, heightened by diplomatic pressure from Napoleon, prompts Russia, Sweden and Denmark to form in December 1800 a League of Armed Neutrality. They declare the Baltic ports out of bounds to British ships. The embargo is strengthened when the Danes seize Hamburg, the main harbour for British trade with the German states.

Britain responds by sending a naval fleet into the Baltic. The second-in-command is Nelson, who sails into shallow and well-defended waters in Copenhagen harbour. There is heavy fighting, during which the commander of the fleet flies the signal for Nelson to withdraw (this is the famous occasion when he puts the telescope to his blind eye).

Nelson destroys many of the ships in the harbour and damages the shore defences in this battle of Copenhagen (2 April 1801). His victory prompts the Danes to make peace in May. Sweden does so in the same month, and Russia follows suit in June.

By now, as after Campo Formio, Britain and France are the only two nations still at war. From the British point of view one affront still needs to be righted. In March 1801 a fleet is sent through the Mediterranean to help the Turks expel the French from Egypt. The French command in Cairo surrenders in June, followed by Alexandria in August.

Both sides are now exhausted. There have been tentative peace talks since February. Terms are agreed in October, putting an end to hostilities. The peace is signed in Amiens in March 1802.

Napoleon's negotiators do well for France. All overseas territories taken by Britain in the past nine years (including several West Indian islands) are returned into French hands. Similarly Minorca reverts to Spain and the Cape colony in South Africa to Holland. But Britain keeps Sri Lanka (taken from the Dutch) and Trinidad (previously Spanish). Egypt is to be Turkish again. Malta (taken by Napoleon in 1798 and by Britain in 1800) is to be restored to the Knights of St John.

The peace of Amiens: 1802-1803

Peace is eagerly greeted by Europeans starved of the pleasures of travel - particularly the British, cooped up in their island for years, who now flock across the Channel to enjoy once again the pleasures of Paris. But this is to prove only a breathing space. Nothing has been resolved in the long rivalry between Britain and France, and each government soon finds much to complain about in the behaviour of the other during the interlude of peace.

Napoleon annoys the British by failing to allow the spirit of harmony into the market place. His refusal to agree a commercial treaty means that British merchants are penalized by high tariffs in French and allied ports. They conclude that peace seems no more profitable than war.

Meanwhile Napoleon alarms the British government by his expansionist behaviour in regions not covered by the treaty - for example in his annexation of Piedmont in 1802, to bridge the gap between France and the Cisalpine republic.

Britain gives France more specific cause for complaint by not fulfilling the terms of the treaty of Amiens. It has been agreed that she will withdraw from Malta. Her failure to do so would be justified in modern eyes by the expressed views of the Maltese. Horrified at the prospect of the return of the Knights of St John, the local assembly passes a resolution inviting George III to become their sovereign on condition that he maintains the Roman Catholic faith in the island.

However, the wishes of local inhabitants carry little weight in diplomatic negotiations in the early 19th century. And Britain, remaining in possession of the island, is undoubtedly in violation of the treaty.

Napoleon complains but avoids pressing the issue to the brink of hostilities. It is likely that his long-term intentions towards Britain are not peaceful, but he is not yet ready for a renewal of war. He needs time, in particular, to build up his fleet. The same logic makes Britain prefer an early renewal of the conflict. For no very good reason, other than long-term self-interest, the British government declares war on France in May 1803.

Emperor: 1804

The return of war is followed by renewed royalist plots, openly encouraged by Britain. One such plot leads to an incident which does considerable damage to Napoleon's international reputation - but also prompts him to take the next step up his personal career ladder.

The French police acquire information (incorrect as it turns out) that one of the leading conspirators in the plot is the young duke of Enghien, a member of the junior branch of the French royal family. He has fought in recent years with émigrés armies and is now living a few miles beyond the French border, across the Rhine at Ettenheim.

Napoleon gives orders for him to be seized. In March 1804 French mounted police make a night raid from Strasbourg to kidnap the duke. He is brought to the castle of Vincennes near Paris, where he is tried by a hastily convened court martial and is shot.

In the aftermath of this event there is the near certainty of further royalist conspiracies. One way to draw their sting may be for France to have once again its own crowned head. Thus there emerges the suggestion that Napoleon should trump the opposition by becoming not king of France but emperor, founding a hereditary Napoleonic dynasty. In May 1804 the senate is persuaded to pass a resolution proposing this major amendment to the constitution.

For a third time a plebiscite is held to confirm another of Napoleon's changing roles at the head of state. Again the result, announced on 6 November 1804, is overwhelming (3,572,329 saying Yes and only 2569 registering No). It is fortunate, though predictable, that the result is so clear - because preparations are already almost complete for the great event of the coronation in Notre Dame.

It takes place on December 2. The pope, Pius VII, has been persuaded to come from Rome to conduct the ceremony - evoking deliberate memories of Charlemagne, the last great emperor to rule France (though if Napoleon sees himself as also becoming Holy Roman emperor, that ambition is scotched by Francis II's abolition of the ancient but defunct empire).

The pope is allowed to anoint Napoleon, in the sacred and mysterious ceremony with roots in French history as far back as Clovis. But when it comes to the more worldly symbol of the crown, Napoleon prefers to take it from the altar himself and place it on his own head. He then places another crown on the head of the empress, his wife Josephine, who understandably - in these most unusual circumstances - bursts into tears.

This highly theatrical event is accompanied by the equally flamboyant creation of a new aristocracy. Princely titles are invented for Napoleon's close relations. By 1808 there is even a new imperial nobility.

These events shock French republicans and many elsewhere who have until now been inspired by Napoleon's achievements. The most famous response is that of Beethoven, working at this time on his third symphony (now known as the Eroica). He has originally given it the name Bonaparte, but he erases the title on hearing that his hero is now calling himself emperor.

Seen from a distance these Napoleonic antics are intrinsically comic (and they provide rich opportunities for Britain's scurrilous cartoonists). But they are made deadly serious by the military genius of the central character. Within four years of his coronation Napoleon is ruler of almost the whole of western Europe.