The construction of a railway in
Ceylon was first raised in 1842 by European coffee planters seeking a line be constructed between Kandy and Colombo as a quicker more efficient means to transport their product for export. After protracted negotiations the Ceylon Railway Company was established in 1845, under the chair of
Philip Anstruther,
Colonial Secretary of Ceylon, to build the colony's first railway. In 1846 the company's engineer, Thomas Drane, undertook preliminary surveys for the new rail line. In December 1856 Captain
William Scarth Moorsom, Chief Engineer of the Corps of Royal Engineers, was sent from England to assess the project for the
Secretary of State for the Colonies,
Henry Labouchere. His report, issued May 1857, considered six alternative routes to Kandy and recommended the adoption of Route No.3 via the Parnepettia Pass, with a total length of , a ruling gradient of one in 60, with a short tunnel at an estimated cost of £856,557. The initial sod turning was on 3 August 1858 (near the present
Maradana railway station) by
Governor Sir
Henry Ward. The Ceylon Railway Company's contractor, William Thomas Doyne, soon realised that it was impossible to complete the work on the estimate submitted. In 1861, the contract with the Ceylon Railway Company was terminated, the subscribed capital paid off, and the government took over the construction work, under the name Ceylon Government Railway (now Sri Lanka Railway). At the end of 1862 the Crown Agents for the Colonies accepted, on behalf of the Government of Ceylon, a tender from
William Frederick Faviell for the construction of of railway between Colombo and Kandy. The service began with a main line connecting Colombo and
Ambepussa.
Guilford Lindsey Molesworth, the first chief engineer, became director general of the government railway. Many Ceylonese people referred to the trains as (
Sinhala:අගුරු කකා වතුර බිබී කොළඹ දුවන යකඩ යකා)
Anguru Kaka Wathura Bibi Colaba Duwana Yakada Yaka ("coal-eating, water-drinking, metal monster which is sprinting to Colombo"). Extensions were made to the main line in 1867, 1874, 1885, 1894 and 1924 to
Kandy,
Nawalapitiya,
Nanu Oya,
Bandarawela and
Badulla. Other lines were added to the rail system during its first century, including an 1880 line to
Matale; the 1895 Coast Railway Line; the 1905 Northern Line; the 1914 Mannar Line; the 1919 Kelani Valley Line; the 1926 Puttalam Line, and the 1928 line to
Batticaloa and
Trincomalee. For more than 80 years after that, no major extensions were added to the Ceylonese rail network. Rail infrastructure was improved from 1955 to 1970 under the management of
B. D. Rampala, chief mechanical engineer and general manager of the Ceylon Government Railway. Until 1953, Ceylon's railways used
steam locomotives. During 1960s and 70s, they changed to
diesel locomotives under Rampala's leadership. The southern line, which was damaged in the
2004 tsunami, was upgraded from 2010 to 2012; its track was upgraded to handle train speeds of . Sri Lanka Railways began partnering with
ExpoRail and
Rajadhani Express in 2011 for premium service on major routes. Its
northern line, affected by almost three decades of war, is being rebuilt; in 2015, it was restored to
Jaffna and
Kankesanthurai at pre-war levels The maximum speed on this line is currently 120 km/h(74 mph). The
southern line is being extended from
Matara to
Kataragama to serve the developing city of
Hambantota. In 2019, track construction to Beliaththa was completed. ==Rolling Stock==