British and Canadian rule (1763–present)
During the American Revolution, revolutionary troops from the southern colonies assaulted the British garrison in the city in the hope that the peoples of Quebec would rise and join the American Revolution so that Canada would join the Continental Congress, along with the other British colonies of continental North America. The American invasion failed, however, and the war resulted in a permanent split of British North America into two entitles: the newly independent United States of America, and those colonies (including Quebec) that remained under British control, which would later become the country of Canada.
The city itself was not attacked during the War of 1812, when the United States again attempted to annex Canadian lands. Amid fears of another American attack on Quebec City, construction of the Citadelle of Quebec began in 1820. The Americans did not attack Canada after the War of 1812, but the Citadelle continued to house a large British garrison until 1871. It is still in use by the military and is also a tourist attraction.
Until the late 18th century Québec was the most populous city in present-day Canada. As of the census of 1790, Montreal surpassed it with 18,000 inhabitants, but Quebec, which had about 14,000 of population at that time, remained the administrative capital of the former New France. It was then made the capital of Lower Canada by the Constitutional Act of 1791. From 1841 to 1867, the capital of the Province of Canada rotated between Kingston, Montreal, Toronto, Ottawa and Quebec City (from 1851 to 1855 and from 1859 to 1865).
The city experienced an economic golden age in the 1800s, due to its favorable location on the Saint Lawrence River which gave rise to industries of wooden sailing ships manufacture, export of squared timber logs to Europe, as well as associated enterprises such as sawmills. However, by the 1870s, Québec City entered a period of economic decline. Contributing factors included the rise of steel-hulled steamships, the expansion of railroads at the expense of waterways for continental commerce; the depletion of forest resources near major rivers upstream of Québec City and in the west of the province, which were transported to Québec's port by log driving; the construction of locks on the Saint Lawrence Seaway, opening up trade routes to the U.S. from Montreal; and the city's inability to retain immigrant populations. This unfavourable context, coupled with the departure of the British army from the city's Citadel in 1871, contributed to the exodus of English speaking populations, such as local bourgeoisie of Scottish origin or workers of Irish background, to Montreal in the second half of the 19th century. Anglophones made up approximately 40% of the city's population in 1861, but 16% in 1901.
Before the Royal Military College of Canada was established in 1876, the only French-speaking officer training school was the Quebec City School of Military Instruction, founded in 1864. The school was retained at Confederation, in 1867. In 1868, The School of Artillery was formed in Montreal.
The Quebec Conference on Canadian Confederation was held in the city in 1864. In 1867, Queen Victoria chose Ottawa as the definite capital of the Dominion of Canada, while Quebec City was confirmed as the capital of the newly created province of Quebec.
During World War II, two conferences were held in Quebec City. The First Quebec Conference was held in 1943 with Franklin D. Roosevelt (President of the United States), Winston Churchill (Prime Minister of the United Kingdom), William Lyon Mackenzie King (Prime Minister of Canada) and T. V. Soong (minister of foreign affairs of China). The Second Quebec Conference was held in 1944 and was attended by Churchill and Roosevelt. They took place in the buildings of the Citadelle and at the nearby Château Frontenac. A large part of the D-Day landing plans were made during those meetings.
Until 2002, Quebec was a mostly urbanized city and its territory coterminous with today's borough of La Cité-Limoilou. The Government of Quebec then mandated a municipal reorganization in the province, and many suburbs of the north shore of the Saint-Lawrence were merged into Quebec City, taking the form of boroughs, thus constituting the boundary of present-day Québec City. In 2008 the city celebrated its 400th anniversary and was gifted funds for festivities and construction projects by provincial and federal governments, as well as public artwork by various entities, including foreign countries.