In 1803, the Electorate of Hanover was occupied by France after the Convention of Artlenburg. From 1807 to 1813, the Hanoverian territory was part of the Kingdom of Westphalia. However, the government of George III did not recognize the French annexation (being at war continuously with France through the entire period) and Hanoverian ministers continued to operate from London. The Hanoverian government maintained its own separate diplomatic service, which maintained links to countries such as Austria and Prussia, with whom the United Kingdom itself was technically at war. The Hanoverian army was dissolved, but many of the officers and soldiers went to England, where they formed the King's German Legion. The KGL was the only German army to fight continually throughout the Napoleonic wars against the French. They played an important part in the Battle of Waterloo in 1815.