In 1314 the two towns joined the Hanseatic League. In the Thirty Years' War (1618-1648) the towns were robbed and destroyed. Potsdam became the new capital, and the Royal Court left the town of Brandenburg. In 1715 the two halves of the town were merged to form a single town.