In the autumn of 1805, at the beginning of the War of the Third Coalition against France (1805), the French occupying troops left Hanover in a campaign against Austria. British, Swedish and Russian coalition forces captured Hanover. In December, the Empire of the French, since 1804 France's new government, ceded Hanover, which it did not hold any more, to Brandenburg-Prussia, which captured it early in 1806.