|Originally the town consisted of two separate centres with no obvious link until the 15th century. A small western settlement, established in the 10th century by Count Baudouin II of Flanders, was protected against Viking raids by a circular enclosure comprising an earth bank and water-filled ditch. To the east a keep was probably erected in the 11th century on the 'Groenberg', the green hill, overlooking the Colme, and nearby Count Baudouin IV founded St Winoc's Abbey in 1022. After the capture and burning of the town by Charles VI of France in 1383, the western settlement and the Groenberg were brought together within a large defended enclosure which gave the town its figure-of-eight shape.|
During the reign of Philip II of Spain, sometime after 1558, the wall was partially modernised by the addition of bastions and an earth bank behind the walls. Although fought over in the Wars of Religion in the 1580s, Bergues was not considered as being as important for the defence of the Spanish Netherlands as Gravelines and Dunkirk, its economic rivals. During the Thirty Years' War, after 1635, two square forts, the Lapin on the north side and the Suisse on the south, protected the area around the town. The forts were later modified and vestiges of them can still be seen.
Bergues suffered its first siege by the French in 1646 and was recaptured by the Spanish in 1651, but, after a second siege in 1658, the town became French again. The Treaty of the Pyrenees, signed the following year, resulted in the town returning to the Spanish Netherlands. It finally became attached to France ten years later, as a result of the Treaty of Aachen. Most of the bastioned fortifications date from between 1647 and 1750, with Bergues one of the second line towns of the Pré-Carré, dear to the heart of Vauban: dating to that period are the crown-works of St Winoc and Hondschoote, the guard house, the Bierne barracks (converted to a public housing project in 1950), the casemated cistern (similar to those of Gravelines and Calais), the powder magazines of Rivage, also known as the Hospital, and the Mill. Along the Dunkirk canal, two forts have stood since 1652 on the site of two earlier Spanish redoubts, Fort Vallières and Fort Castelnau.
Due to the proximity of Bergues to Belgium, which came under Dutch rule in 1815, the town's southern and western defences were improved. The arrival of the railway in the mid-19th century, which was supposed to give the town its share in the industrial revolution, coincided with one final phase of fortification, the crown-work of Bierne, now an industrial zone.
Although it was partly spared in the 1914-18 war, Bergues suffered massive bombardment in 1940. The town was rebuilt after 1945, keeping the traditional proportions of the houses and respecting the ancient design.