After seven years of French occupation, encouraged by the desertion of French soldiers after the failed invasion of Russia and the reentry of Austria in the war, all the social classes of the Ragusan people rose up in a general insurrection, led by the patricians, against the Napoleonic invaders. On 18 June 1813, together with British forces they forced the surrender of the French garrison of the island of Šipan, soon also the heavily fortified town of Ston and the island of Lopud, after which the insurrection spread throughout the mainland, starting with Konavle. They then laid siege to the occupied city, helped by the British Royal Navy, who had enjoyed unopposed domination over the Adriatic sea, under the command of Captain William Hoste, with his ships HMS "Bacchante" and . Soon the population inside the city joined the insurrection. The Austrian Empire sent a force under General Todor Milutinović offering to help their Ragusan allies. However, as was soon shown, their intention was to in fact replace the French occupation of Ragusa with their own. Seducing one of the temporary governors of the Republic, Biagio Bernardo Caboga, with promises of power and influence (which were later cut short and who died in ignominy, branded as a traitor by his people), they managed to convince him that the gate to the east was to be kept closed to the Ragusan forces and to let the Austrian forces enter the City from the west, without any Ragusan soldiers, once the French garrison of 500 troops under General Joseph de Montrichard had surrendered.