A castle named Horeburg, meaning swamp castle, was probably erected by the counts of
Stade, to secure the eastern border of the county. The oldest records mentioning the castle date back to 1133 and 1137. Outside the castle a settlement developed. As to religion Harburg belonged to the
Diocese of Verden (till 1648). In 1257 the area became part of the Duchy of
Brunswick and Lunenburg. After its dynastic partition in 1267 Harburg was part of the Brunswick-Lunenburgian
Principality of Lunenburg (Celle). In 1288 the settlement outside the castle was granted municipal rights and in 1297
town privileges. The town was then the centre of the Bailiwick of Harburg (Vogtei Harburg). After
Duke Otto (1495–1549), who co-ruled Lunenburg-Celle with his brother Duke
Ernest I the Confessor, had married a woman unconformable to his rank, he was urged to retire from co-ruling the principality in 1527. Otto could reach an agreement, allowing him and his family to live in Harburg castle and to rule his own precinct, the Bailiwick of Harburg, however, as a
subfief of Lunenburg-Celle. Thus Harburg became the capital of the Principality of Harburg, which continued to exist under Otto's son, Duke Otto II of Harburg (1528–1603) and grandson Duke William Augustus (1564–1642). With the latter's death the Brunswick-Lunenburgian branch of Harburg was extinct in the male line and the area reunited with Lunenburg-Celle proper. In 1705 the Lunenburg-Celle line was extinct and the principality inherited by Duke
George Louis of Brunswick and Lunenburg (Calenberg), ruling the
Principality of Calenberg, which managed to be upgraded as
Electorate of Brunswick and Lunenburg, colloquially named after its capital Electorate of Hanover, in 1708. In 1714 Prince-Elector George Louis ascended the British throne as George I, ruling Hanover and Britain in
personal union. During this period (in 1720–23) the town was the notional headquarters of the abortive Harburg Company which, with a charter from
King George I of Great Britain and funded by a dubious
lottery scheme, was supposed to deepen the river and improve the harbour. When the lottery was forbidden to operate in England as fraudulent and illegal, the scheme foundered. Its principal proponent,
John Barrington, was expelled from the British Parliament. During the
Great French War Harburg suffered changing conquests, liberations and occupations, until it was first annexed by
Westphalia (1807), only to be annexed by
France in 1810. Harburg then became the capital of the ''Canton d'Harbourg
within the Arrondissement de Lunebourg'' of the
Département des Bouches-de-l'Elbe. After the French defeat in 1813 Harburg returned to Hanover, which was upgraded to the
Kingdom of Hanover in 1814. The Hanoveran-British personal union ended in 1837. Hanover, including Harburg, was defeated in the
German War of Brothers and annexed by
Prussia in 1866 (now a part of the
Province of Hanover), joining
united Germany in 1871. Since the 19th century the town has been distinguished as Harburg upon Elbe (Harburg an der Elbe or Harburg/Elbe) from the
homonymous town in Bavaria. With the defeat of Germany and the abdication of the monarchs in Germany in 1918, Prussia adopted a democratic government as a German state and was formally named
Free State of Prussia. In 1927 Harburg/Elbe merged with
Wilhelmsburg into
Harburg-Wilhelmsburg. On 1 April 1937 Harburg-Wilhelmsburg was disentangled from Prussia – according to the "
Greater Hamburg Act" – and ceded to the state of
Hamburg, which on 1 April 1938 incorporated the city into a unitary
city state municipality (Einheitsgemeinde), thus abolishing Harburg(-Wilhelmsburg)'s municipal independence dating back to 1288. ==Geography==