Fort Nieulay, located along the Avenue Pierre Coubertin, was originally dated to the 12th or 13th century. During the English invasion in 1346, sluices gates were added as water defences and a fort was built up around it in 1525 on the principle that the people of the fort could defend the town by flooding it. In April and May 1677, Louis XIV and Vauban visited Calais and ordered a complete rebuilding of Fort Nieulay. It was completed in 1679, with the purpose to protect the bridge of Nieulay crossing the Hames River. By 1815 the fort had fallen into a ruined state and it wasn't until 1903 that it was sold and improved by its farmer tenants. The fort was briefly the site of a low-key scuffle with Germans in May 1940.
References:The Citadelle of Quebec is an active military installation and official residence of both the Canadian monarch and the Governor General of Canada. It is located atop Cap Diamant, adjoining the Plains of Abraham in Quebec City. The citadel is the oldest military building in Canada, and forms part of the fortifications of Quebec City, which is one of only two cities in North America still surrounded by fortifications, the other being Campeche, Mexico.
The first fortifications in Quebec were built by the Governor General of New France Louis de Buade, and completed just in time for the Battle of Quebec in 1690.
After the British conquest in the second half of the 18th century, the problem of Quebec City's defences grew more acute.