The state-operated national rail system was started by King Chulalongkorn, and the first section--from Bangkok to Ayutthaya-- was inaugurated in 1896. The line was extended to Nakhon Ratchasima in 1910, and during the first decade of the century work had already begun on other lines to the north and south. By 1941 well over four-fifths of the present-day rail system had been opened.
After 1951 control of the railroads was vested by law in the State Railway of Thailand (SRT), an autonomous agency. Through 1979 SRT had received a number of assistance loans from the World Bank, as well as bilateral aid with which the line was first rehabilitated and later modernized, including replacement of steam locomotives by diesel units. In the early 1980s, SRT had about 4,000 kilometers of meter-gauge track, all of it single track except for a 90-kilometer section of double track running north of Bangkok to near Ayutthaya. Four main interconnecting lines originating in Bangkok ran to Chiang Mai (Northern Line), Aranyaprathet (Eastern Line), Nong Khai and Ubon Ratchathani (Northeastern Line), and the Malaysian border (Southern Line). A number of branch lines were also in operation, including a line constructed in the 1980s to link the Lan Krabu oil field in Kamphaeng Phet Province to the Northern Line. Also under construction in the mid-1980s was a link from Bangkok down the eastern seaboard to Rayong, which was completed as far as Sattahip in 1984.
Competition from developing road services had cut heavily into railroad passenger and freight traffic, and the proportional share of freight declined between 1968 and 1976 from 19 percent to 11 percent. In the 1980s, however, the rail lines remained of major importance in the transport of bulk commodities, such as petroleum products, cement, and rice, over long distances.