Canada has a large and well-developed railway system that today transports primarily freight. There are two major privately owned transcontinental freight railway systems, the Canadian National and Canadian Pacific Railway. Nation-wide passenger services are provided by the federal crown corporation Via Rail. Three Canadian cities have commuter train services: in the Montreal area by Agence métropolitaine de transport, in the Toronto area by GO Transit, and in the Vancouver area by West Coast Express. These cities and several others are also served by light rail or metro systems. Smaller railways such as Ontario Northland Railway and Algoma Central Railway also run passenger trains to remote rural areas.The Rocky Mountaineer and Royal Canadian Pacific provide Railtours through the Rocky Mountains.
Canada has 49,422 kilometers (30,709 mi) total trackage, of which only 129 kilometers (80 mi) is electrified. Canada uses 1,435 mm (4 ft 8 1⁄2 in) (standard gauge) track for the majority of its railway system. The exceptions to this are small lines isolated from the main North American rail network used in resource industries such as mining or forestry, some of which are narrow gauge, and the broad-gauge streetcar and subway lines of Toronto.
The first Canadian railway, the Champlain and Saint Lawrence Railroad, was opened in 1836 outside of Montreal. Heavy expansion of the rail system did not get under way until the Guarantee Act of 1849 that guaranteed bond returns on all railways over 121 km (75 mi). This led to rapid expansion of railways in the Canadas, sometimes excessive growth as uneconomic lines were built since the government guaranteed profits.
This proved disastrous for government finances, however, and the Canadas were all but bankrupted by the subsidies. The largest rail project of this period was also a disaster. The Grand Trunk Railway linking Montreal to Sarnia was finished in 1860, but was vastly mired in debt. In exchange for bailing out the company the government escaped its guarantee on the railway bonds.
Canadian confederation was made possible in part by the railways. The separate colonial governments had all but emptied their treasuries building railways, and a new and more stable method of financing them was required. It was also believed that union would allow for the needed construction of railways linking British North America. The Maritimes joined only because of promises to build the Intercolonial Railway, and British Columbia only because of a promise to build a transcontinental railway.
The government had learnt its lesson, and these railways were not funded by guarantees. Rather, the construction of the Intercolonial was fully controlled by the government under the skilled direction of Sir Sanford Fleming.
The railway to the Pacific, the Canadian Pacific, was financed by private funds and through massive land grants in the Canadian prairies (much of it of little value until the railway arrived), $25 million in cash and a guaranteed monopoly. The railway, an engineering marvel that was then the longest in the world, was completed in 1885 to great fanfare.
The booming Canadian economy after 1900 led to plans to build two new transcontinental railways. The Canadian Northern, a successful system covering the northern part of the prairies, and the Grand Trunk (through its Grand Trunk Pacific subsidiary) both launched ambitious plans to expand. The government at first encouraged the two to come to some arrangement and build only one new network, but in the end no agreement was made and the government supported the expansion of both systems. The federal government itself built the National Transcontinental, a line from Moncton, New Brunswick, through Quebec City to Winnipeg, passing through the vast and uninhabited hinterland of the Canadian Shield.
This aggressive expansion proved disastrous when immigration and supplies of capital all but disappeared with the outbreak of the First World War. The Canadian Northern, Grand Trunk Pacific, and Grand Trunk were nationalized by the federal government, which absorbed the debt of over two billion dollars. All three railways, along with the Canadian Government Railways (formed by the Intercolonial, National Transcontinental, and several smaller lines) were then merged into the Canadian National Railways between 1918 and 1923.
The years after the First World War saw only moderate expansion of the rail network and the age of the great railways were over in Canada. The automobile provided strong competition by the 1920s, and after the Second World War most passengers were lost to automobiles and airlines. During the post-war period several large resource lines were opened in Quebec, Labrador, and British Columbia – several of which are not directly connected to the main North American network.
In 1978 the government created Via Rail which took over all national passenger service in the country. In 1987 the National Transportation Act partially deregulated the railway industry in Canada and removed much of the red tape that railways experienced when attempting to abandon unprofitable lines; however, the NTA is now viewed as more of a failure in that railways used the legislation merely as a first-resort after "demarketing" a line, rather than a last-resort after trying to find a short line buyer. In November 1995 the federal government privatized CN, and in 1996, the government corrected the NTA 1987 shortfalls with the Canadian Transportation Act which more fully deregulates the railway industry.