The first fortification was the castle built by bishop Absalon in 1167 on Slotsholmen at the foundation of the city. This stood for 200 years until it was destroyed by the Hanse in 1369. It was replaced in 1417 by the Copenhagen Castle built by the then bishop, but taken over by the king, Eric of Pomerania. The ruins of both these castles are visible to the public view under the Christiansborg Palace.
The city was extensively fortified by Christian IV in the mid 17th century. To the west the city was protected by a series of ramparts and bastions northwards from the Indrehavn, below Langebro. The remains of these works can be seen in the parks at Tivoli, Ørstedsparken, the Botanical Garden and Østre Anlæg. To the north, at the end of the wall, a fort was built, the Kastellet. To the east land was reclaimed from the sea to enclose the harbour; this land was also fortified with a rampart and ditch and a series of bastions. This now forms the district of Christianshavn.
The most recent fortification of Copenhagen dates from the late 19th century. To the west was a fortification ring consisting of a rampart and ditch, with numerous bastions and batteries (Vestvolden). To the north, beyond a line of inundations around Utterslev Mose, lie 5 detached land forts (Bagsværd Fort, Fortunfortet, Garderhøj Fort, Gladsaxe Fort, Lyngby Fort), backed to the south by 7 small batteries.
Along the coast, and connecting with the land defences were two bands of Naval forts or batteries; the first (inner) band comprising 3 older forts (Trekroner, Lynetten and Strickers Batteri) and 3 new (Kalkbrænderi Batteri, Mellemfortet and Prøvestenen); and a second of 2 coastal forts (Charlottenlund, Kastrup) and a sea fortress (Middelgrundsfortet), plus 2 inland batteries (Avedøre and Hvidøre) to reinforce the Vestvolden. A third, outer line was added fifteen years later.
The design of the forts was guided by the principles of Brialmont.
The group of new coastal forts were constructed at the beginning of World War I. These were (clockwise): Taarbæk Fort, connecting to the northern fort line; Flakfortet, at sea beyond Middelgrundsfortet; and Dragør Fort, Kongelundsfortet, Mosede Fort to the south.