Since 1618, the Margraviate of Brandenburg had been in personal union with the Duchy of Prussia. In 1701, the dual state formed the Kingdom of Prussia, as Frederick III, Elector of Brandenburg, crowned himself as king Frederick I in Prussia. Berlin became the capital of the new Kingdom, replacing Königsberg. This was a successful attempt to centralise the capital in the very far-flung state, and it was the first time the city began to grow. In 1709, Berlin merged with the four cities of Cölln, Friedrichswerder, Friedrichstadt and Dorotheenstadt under the name Berlin, "Haupt- und Residenzstadt Berlin".