After the arrest of the Girondist deputies on the 2 June 1793, there followed a series of insurrections within the French cities of Lyon, Avignon, Nîmes and Marseille known as Federalist revolts. In Toulon, the revolutionaries evicted the existing Jacobin faction but were soon supplanted by the more numerous royalists. Upon the announcement of the recapture of Marseille and of the reprisals which had taken place there at the hands of the revolutionaries, the royalist forces, directed by the Baron d'Imbert, called for aid from the Anglo-Spanish fleet. On 28 August, Admiral Sir Samuel Hood of the Royal Navy and Admiral Juan de Lángara of the Spanish Navy, committed a force of 13,000 British, Spanish, Neapolitan and Piedmontese troops to the French royalists' cause. This was a serious blow to the republic, as the city had a key naval arsenal and was the base for 26 ships of the line  (about one third of the total available to the French Navy). Without this port there was no hope for French naval ambitions. As a result, any desire to challenge the Allies, and specifically the British, for control of the seas would be out of the question. In addition, its loss could set a dangerous precedent for other areas that menaced the republic with revolt. The survival of the Republic was at stake. On 1 October, Baron d'Imbert proclaimed the young Louis XVII to be king of France, and hoisted the French royalist flag of the fleur de lys, delivering the town of Toulon to the British navy.
The troops of the army said to be of the "Carmagnoles", under the command of General Jean François Carteaux, arrived at Toulon on 8 September, after those troops had recovered Avignon and Marseille, and then Ollioules. They joined up with the 6,000 men of the Alpine Maritime Army, commanded by General Jean François Cornu de La Poype, who had just taken La Valette-du-Var, and sought to take the forts of Mont Faron, which dominated the city to the East. They were reinforced by 3,000 sailors under the orders of Admiral de Saint Julien, who refused to serve the British with his chief, Trogoff. A further 5,000 soldiers under General La Poype were attached to the army to retake Toulon from the Army of Italy.
The Chief of Artillery, commander Elzéar Auguste de Dommartin, having been wounded at Ollioules, had the young captain Napoleon Bonaparte imposed upon him by the special representatives of the Convention and Napoleon's friends --Augustin Robespierre and Antoine Christophe Saliceti. Bonaparte had been in the area escorting a convoy of powder wagons en route to Nice and had stopped in to pay his respects to his fellow Corsican, Saliceti. Bonaparte had been present in the army since the Avignon insurrection (July, 1793), and was imposed on Dommartin in this way despite the mutual antipathy between the two men.
Despite the mutual dislike between Bonaparte and the chief of artillery, the young artillery officer was able to muster an artillery force that was worthy of a siege of Toulon and the fortresses that were quickly built by the British in its immediate environs. He was able to requisition equipment and cannon from the surrounding area. Guns were taken from Marseille, Avignon and the Army of Italy. The local populace, which was eager to prove its loyalty to the republic which it had recently rebelled against, was blackmailed into supplying the besieging force with animals and supplies. His activity resulted in the acquisition of 100 guns for the force. With the help of his friends, the deputies Saliceti and Augustin Robespierre, who held power of life and death, he was able to compel retired artillery officers from the area to re-enlist. The problem of manning the guns was not remedied by this solution alone, and under Bonaparte's intensive training he instructed much of the infantry in the practice of employing, deploying and firing the artillery that his efforts had recently acquired. However, in spite of this effort, Bonaparte was not as confident about this operation as was later his custom. The officers serving with him in the siege were incompetent, and he was becoming concerned about the needless delays due to these officers' mistakes. He was so concerned that he wrote a letter of appeal to the Committee of Public Safety requesting assistance. To deal with his superiors who were wanting in skill, he proposed the appointment of a general for command of the artillery, succeeding himself, so that "... (they could) command respect and deal with a crowd of fools on the staff with whom one has constantly to argue and lay down the law in order to overcome their prejudices and make them take steps which theory and practice alike have shown to be axiomatic to any trained officer of this corps".
After some reconnaissance, Bonaparte conceived a plan which envisaged the capture of the forts of l'Eguillette and Balaguier, on the hill of Cairo, which would then prevent passage between the small and large harbours of the port, so cutting maritime resupply, necessary for those under siege. Carteaux, reluctant, sent only a weak detachment under Major General Delaborde, which failed in its attempted conquest on 22 September. The allies now alerted, built "Fort Mulgrave", so christened in honour of the British commander, Henry Phipps, 1st Earl of Mulgrave, on the summit of the hill. It was supported by three smaller ones, called Saint-Phillipe, Saint-Côme, and Saint-Charles. The apparently impregnable collection was nicknamed, by the French, "Little Gibraltar".
Bonaparte was dissatisfied by the sole battery--called the "Mountain", positioned on the height of Saint-Laurent since 19 September. He established another, on the shore of Brégallion, called the "sans-culottes". Hood attempted to silence it, without success, but the British fleet was obliged to harden its resolve along the coast anew, because of the high seabed of Mourillon and la Tour Royale. On the first of October, after the failure of General La Poype against the "Eastern Fort" of Faron, Bonaparte was asked to bombard the large fort of Malbousquet, whose fall would be required to enable the capture of the city. He therefore requisitioned artillery from all of the surrounding countryside, holding the power of fifty batteries of six cannon apiece. Promoted to Chief of Battalion on 19 October, he organised a grand battery, said to be "of the Convention", on the hill of Arènes and facing the fort, supported by those of the "Camp of the Republicans" on the hill of Dumonceau, by those of the "Farinière" on the hill of Gaux, and those of the "Poudrière" at Lagoubran.
On 11 November, Carteaux was dismissed and replaced by Doppet, formerly a doctor, whose indecision would cause an attempted surprise against Fort Mulgrave to fail on the 16th. Aware of his own incompetence, he resigned. He was succeeded by a career soldier, Dugommier, who immediately recognized the virtue of Bonaparte's plan, and prepared for the capture of Little Gibraltar. On the 20th, as soon as he arrived, the battery "Jacobins" was established, on the ridge of l'Evescat. Then, on the left, on 28 November, the battery of the "Men Without Fear", and then on 14 December, the "Chasse Coquins" were constructed between the two. Two other batteries were organized to repel the eventual intervention of the allied ships, they were called "The Great Harbour" and the "Four Windmills".
Pressured by the bombardment, the Anglo-Neapolitans executed a sortie, and took hold of the battery of the "Convention". A counter-attack, headed by Dugommier and Bonaparte, pushed them back and the British general, Charles O'Hara, was captured. He initiated surrender negotiations with Robespierre the Younger and Antoine Louis Albitte and the Federalist and Royalist battalions were disarmed.
Following O'Hara's capture, Dugommier, La Poype, and Bonaparte (now a colonel) launched a general assault during the night of 16 December. Around midnight, the assault began on Little Gibraltar and the fighting continued all night. Bonaparte was injured in the thigh by a British sergeant with a bayonet. However, in the morning, the position having been taken, Marmont was able to place artillery there, against l'Eguillette and Balaguier, which the British had evacuated without confrontation on the same day. During this time, La Poype finally was able to take the forts of Faron and Malbousquet. The allies then decided to evacuate by their maritime route. Commodore Sydney Smith was instructed by Hood to have the delivery fleet and the arsenal burnt.
Lángara ordered Don Pedro Cotiella to take three boats into the arsenal to destroy the French fleet. Sir Sidney Smith, who had recently arrived, volunteered to accompany him with his ship Swallow and three British boats. Cotiella was tasked with sinking Toulon's powder hulks; one was a disarmed former British frigate captured during the American Revolutionary War, Montréal, and the other was the French frigate Iris. These ships contained the gunpowder stores for the entire fleet and due to the danger of explosion were anchored in the outer roads, some distance from the city. He was then instructed to enter the Old Arsenal and destroy the ships there. The dock gates, which had been barred against attack and manned by 800 former galley slaves freed during the retreat. Their sympathies were with the advancing Republicans so to ensure that they did not interfere, Smith kept his guns trained on them throughout the operation. His boats were spotted by the Republican batteries on the heights and cannonballs and shells landed in the arsenal, although none struck Smith's men. As darkness fell Republican troops reached the shoreline and contributed musketry to the fusillade; Smith replied with grape shot from his boat's guns.
At 20:00 Captain Charles Hare brought the fireship HMS Vulcan into the New Arsenal. Smith halted the ship across the row of anchored French ships of the line, and lit the fuses at 22:00. Hare was badly wounded by an early detonation as he attempted to leave his ship. Simultaneously, fire parties set alight the warehouses and stores ashore, including the mast house and the hemp and timber stores, creating an inferno across the harbour as Vulcans cannons fired a last salvo at the French positions on the shore. With the fires spreading through the dockyards and New Arsenal, Smith began to withdraw. His force was illuminated by the flames, making an inviting target for the Republican batteries. As his boats passed the Iris however the powder ship suddenly and unexpectedly exploded, blasting debris in a wide circle and sinking two of the British boats. On Britannia all of the crew survived, but the blast killed the master and three men on Union.
With the New Arsenal in flames, Smith realised that the Old Arsenal appeared intact; only a few small fires marked the Spanish effort to destroy the French ships anchored within. He immediately led Swallow back towards the arsenal but found that Republican soldiers had captured it intact, their heavy musketry driving him back. Instead he turned to two disarmed ships of the line, Héros and Thémistocle, which lay in the inner roads as prison hulks. The French Republican prisoners on board had initially resisted British efforts to burn the ships, but with the evidence of the destruction in the arsenal before them they consented to be safely conveyed to shore as Smith's men set the empty hulls on fire.
With all the available targets on fire or in French hands, Smith withdrew once more, accompanied by dozens of small watercraft packed with Toulonnais refugees and Neapolitan soldiers separated during the retreat. As he passed the second powder hulk, Montréal, she also exploded unexpectedly. Although his force was well within the blast radius, on this occasion none of Smith's men were struck by falling debris and his boats retired to the waiting British fleet without further incident. As Smith's boats had gone about their work Hood had ordered HMS Robust under Captain George Elphinstone and HMS Leviathan under Captain Benjamin Hallowell to evacuate the allied troops from the waterfront. They were joined by HMS Courageux under Captain William Waldegrave, which had been undergoing repairs in the Arsenal to replace a damaged rudder. Despite this handicap, Courageux was able to participate in the evacuation and warp out of the harbour with the replacement rudder following behind, suspended between two ship's boats. The fireship HMS Conflagration, also undergoing repairs, was unable to sail and was destroyed during the evacuation. By the morning of 19 December Elphinstone's squadron had retrieved all of the Allied soldiers from the city without losing a single man.
In addition to the soldiery, the British squadron and their boats took on board thousands of French Royalist refugees, who had flocked to the waterfront when it became clear that the city would fall to the Republicans. Robust, the last to leave, carried more than 3,000 civilians from the harbour and another 4,000 were recorded on board Princess Royal out in the roads. In total the British fleet rescued 14,877 Toulonnais from the city; witnesses on board the retreating ships reported scenes of panic on the waterfront as stampeding civilians were crushed or drowned in their haste to escape the advancing Republican soldiers, who fired indiscriminately into the fleeing populace.
The troops of the Convention entered the city on 19 December. The subsequent suppression of Royalists, directed by Paul Barras and Stanislas Fréron, was extremely bloody. It is estimated that between 700 and 800 prisoners were shot or slain by bayonet on Toulon's Champ de Mars. Bonaparte, treated for his injuries by Jean François Hernandez, was not present at the massacre. Promoted to Brigadier General on 22 December, he was already on his way to his new post in Nice as the artillery commander for the Italian Army. A gate, which comprises part of the old walls of the city of Toulon, evokes his departure; a commemorative plaque has been affixed there. This gate is called the Porte d'Italie.