From 1626 Achim was controlled alternately by Danes and Swedes. In 1648 the Prince-Archbishopric was transformed into the Duchy of Bremen, which was first ruled in personal union by the Swedish Crown and — interrupted by a Danish occupation (1712–1715) — from 1715 on by the House of Hanover. During the Third Silesian or Seven Years' War (precipitated by the Anglo-French and Indian War) it was controlled by France. In 1807 the ephemeric Kingdom of Westphalia annexed the Duchy of Bremen, including Achim, before France annexed it in 1810. Achim became the capital of a homonymous canton within the Département des Bouches-du-Weser. In 1813 the Duchy was restored to the Electorate of Hanover. In 1814 the Electorate was upgraded to the Kingdom of Hanover at the Congress of Vienna. In 1823 Hanover incorporated the Duchy in a real union and the ducal territory, including Achim, became part of the Stade Region, established in 1823.