After the Treaty of Campo Formio in 1797, it passed to the Habsburg Monarchy.
However, in 1805, it was assigned to the French Empire's client state, the Napoleonic Kingdom of Italy by the Treaty of Pressburg, although in fact held by a Russian squadron under Dmitry Senyavin.
 After the Russians retreated, Kotor was united in 1806 with this Kingdom of Italy and then in 1810 with the French Empire's Illyrian Provinces.
Kotor was captured by the British in an attack on the Bay led by Commodore John Harper in the brig sloop HMS Saracen (18 guns).
To seal off Kotor, residents along the shore literally pulled the ship in windless conditions with ropes.
The Saracen's crew later hauled naval 18-pounder guns above Fort St. John, the fortress near Kotor, and were reinforced by Captain William Hoste with his ship HMS Bacchante (38 guns).
The French garrison had no alternative but to surrender, which it did on 5 January 1814.

It was restored to the Habsburg Monarchy by the Congress of Vienna.
Until 1918, the town, then known as Cattaro, was head of the district of the same name, one of the 13 Bezirkshauptmannschaften in the Kingdom of Dalmatia.
After the Treaty of Campo Formio in 1797, it passed to the Habsburg Monarchy. However, in 1805, it was assigned to the French Empire's client state, the Napoleonic Kingdom of Italy by the Treaty of Pressburg, although in fact held by a Russian squadron under Dmitry Senyavin.  After the Russians retreated, Kotor was united in 1806 with this Kingdom of Italy and then in 1810 with the French Empire's Illyrian Provinces. Kotor was captured by the British in an attack on the Bay led by Commodore John Harper in the brig sloop HMS Saracen (18 guns). To seal off Kotor, residents along the shore literally pulled the ship in windless conditions with ropes. The Saracen's crew later hauled naval 18-pounder guns above Fort St. John, the fortress near Kotor, and were reinforced by Captain William Hoste with his ship HMS Bacchante (38 guns). The French garrison had no alternative but to surrender, which it did on 5 January 1814.
It was restored to the Habsburg Monarchy by the Congress of Vienna. Until 1918, the town, then known as Cattaro, was head of the district of the same name, one of the 13 Bezirkshauptmannschaften in the Kingdom of Dalmatia.
Kotor