After Canadian Confederation in 1867, Canada became responsible for its own defence; the British departed the Citadelle in 1871. Two batteries of the Royal Canadian Artillery were established at the Citadelle and an artillery school was opened in 1871, followed by a cavalry school. From the late 19th century, living conditions for soldiers at the fort gradually improved; canteens were opened and the casemates were made more comfortable. The preservation of much of the fortifications and defences of Quebec is due to the intervention of Governor General of Canada the Marquess of Dufferin and Ava, who also established the Citadelle as a viceregal residence in 1872, reviving a tradition dating to the founding of New France. Since 1920, the Citadelle has been the home station of the Royal 22e Régiment of the Canadian Forces.