It is not known exactly when the Tiefburg castle was built or by whom. It is assumed that it was built in the 12th century, possibly by the Abbey of Lorsch or the Count Palatinates of the Rhine (later known as the Prince Electors of the Palatinate), who set up residence in nearby Heidelberg around this time. It is also possible that the castle had its origins in a fortiied estate. The knights of Handschuhsheim who lived in the Tiefburg were initially unfree knights, known as ministeriales, in the service of the Abbey of Lorsch, and later on vassals of the Prince Electors of the Palatinate. The dynasty died out when the last knight of Handschuhsheim, Johannes (Hans) V., died aged 16 on 31st December 1600 from injuries sustained in a duel. Through inheritance, the Tiefburg became the property of the barons of Helmstatt (who became counts of Helmstatt in the 18th century).
Tiefburg was badly damaged in the Thirty Years‘ War. In 1689 it fell victim to the War of the Palatine Succession and became uninhabitable, whereupon the Helmstatts built a new residence in the immediate vicinity. The original gate of this new residence can still be seen to the east of the square in front of the Tiefburg. Count Raban von Helmstatt had the Tiefburg restored in the years 1910 to 1913.
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.