The Trans-Iranian Railway () was a major railway building project started in Pahlavi Iran in 1927 and completed in 1938, under the direction of the then-Iranian monarch Reza Shah. It was entirely built with indigenous capital, and links the capital Tehran with Bandar Shahpur (now: Bandar-e Emam Khomeyni) on the Persian Gulf in the south and Bandar Shah (now: Bandar Torkaman) on the Caspian Sea in the north, via Ahvaz and Qom.Wright, p. 367 In 1961, under Reza Shah's son Mohammad Reza Pahlavi, it was extended from Bandar Shah to a new terminus in Gorgan. During the land reforms of Mohammad Reza Pahlavi in 1963, as part of the "White Revolution", the Trans-Iranian railway was extended to link Tehran to Mashhad, Tabriz, and Isfahan.Abrahamian, p. 133

The original 1938 Bandar Shahpur-to-Bandar Shah route was designated as a UNESCO World Heritage Site in July 2021.

Before World War I: the Russian scheme The idea of a railway connecting the Russian Empire and British India was proposed by several private Russian promoters in 1889, 1900, and 1905. However, the Russian government declined such proposals, fearing that it would jeopardize Russia's geographically enabled commercial dominance in Iran as well as complicate relations with the British. In 1889, Russia and Naser al-Din Shah Qajar agreed that no railways would be built in Iran without the consent of the Russians. However, by 1910 the agreement was vetoed in the Iranian Constitutional Revolution. Fears that Russian interests were no longer primary, alongside the surfacing of anti-Russian political forces in the country, and the emergence of a German threat, made it more important than ever for Iran to protect its commercial interests by building a railway.Spring, pp. 60-61

To build the railway the problem of raising enough capital to fund the project was discussed. The Russo-Japanese War of 1905 was one of several factors leaving Russia on a tight budget, preventing Russia from providing funds.Spring, p. 61 The British were solicited as well, but the request could not be granted, pushing back initiation of the railway's construction further. Nikolay Khomyakov, President of the Duma, and I.A. Zveginstov, supporters of the Anglo-Russian Entente, promoted a private initiative for a railway connecting India and Europe, to counteract the economic threat Germany posed to the region. Germany's influence over the region was enabled by the Berlin–Baghdad railway, which connected Germany and the Ottoman Empire (modern-day Turkey, Syria and Iraq), enabling Germany to begin plans for connecting the railway to Tehran to increase its commercial enterprise. Despite opposition from the Russian Ministry of Foreign Affairs and Ministry of Finance, there was also support for the project.Spring pp. 63-64

A Trans-Iranian Railway Consortium was formed by December 1910, consisting of twelve major Russian banks. Nine of these banks came to an agreement with major French banks in 1911, resulting in the crucial financial support needed to fund the railway. However, the final step needed to initiate the project was the support of the British, who wanted to restore financial stability in Iran but did not wish to be involved in the Trans-Iranian Railway Consortium through the proposed four to six million pound loan, proposed by Alexander Izvolsky, Imperial Foreign Minister 1906–10, and Sergey Sazonov, Foreign Minister 1910–16. Sazonov continued to urge for the loan, believing it to be the solution to prevent Persia from bankruptcy. Lord Curzon, British Viceroy of India, rejected the loan, suspicious that the Russians had an acquisitive eye on Britain's precious Indian colony, provoking stark protest from Sazonov against the accusation. Finally, in 1912, the Russian, French, and British financiers formed a Société d'Etudes for the Trans-Iranian railway.Spring pp. 64-65

When Arthur von Gwinner, Chief Manager of Deutsche Bank and the Baghdad Railway, announced plans to build a section of the railway connecting Baghdad to Khanaqin by 1916, the Russians moved quickly to secure British support and French investments in the Société d'Etudes.Spring pp. 71-72 The Russians were primarily concerned with the construction of the northern section of the line, extending from Astara to Tehran, while the British were more concerned with the southern section, since they already dominated the southern region and the Persian Gulf.Spring pp. 74-75

Meanwhile, the Balkan Wars in the Ottoman Empire (1912–13) created an unstable situation in the country, again putting off the initiation of the application. Such instability caused investors in the Société d'Etudes to hesitate in investing in a bankrupt Iran. Sazonov suggested that appointing a strong Iranian leader would aid the financial aspect of the railway project. Javad Sa'd al-Dowleh, former prime minister under former Mohammad Ali Shah Qajar, agreed to work with the two powers to use a grant from the Société d'Etudes and thus proceed with the construction of the Trans-Iranian Railway without the agreement of the newly formed parliament. However, Sir Edward Grey, Britain's Secretary of State for Foreign Affairs, refused to force the Iranians to accept Sa'd al-Dowleh as Prime Minister, because of his aversion to the Constitutional movement in Iran.Spring pp. 73-74

The outcome of the Balkan Wars caused Russia and Britain to accept the probability of war with the Central Powers in the near future, suggesting the necessity of strong Anglo-Russian relations. Sazonov grew frustrated with Britain's inability to compromise on a route incorporating India, and threatened to proceed with the northern route. Fearing the implications of the impending war, Grey at last found it in Britain's best interest to concede at last, and agreed to initiate application of the railway under the Balmoral conditions. By this time Britain already had further consolidated its control over the Persian Gulf.Spring pp. 78, 80

By June 1914, surveys for the Enzeli-Tehran section had begun, and by 1915 the results of the Astara-Tehran part of the railway were completed and published. Still, progress on the railway was slow. Then, a few days after the outbreak of World War I, Russia repudiated its obligation to build the Tehran-Khanaqin line under the Potsdam Agreement.Spring, p. 81

After World War I

After the substantial interruption of World War I, the project for constructing a standard-gauge railway across Iran was initiated by Reza Shah Pahlavi as part of multiple reforms contributing to the drastic modernization of Iran that occurred in the Interwar period. Although technically independent, Iran was still a financially devastated and weak country. Yet the 1930s brought the emergence of an economic market, a drastic increase in modern industries, a rise in exports, and an increase in agricultural output.Clawson, pp. 235-236

Initially, British and Russian observers considered the implantation of railways as the ultimate solution to the immense transportation problems Iran faced due to sparsely settled population, the lack of rivers, high mountains, and inhospitable desert regions of the country. A number of Americans and British opposed the Trans-Iranian Railway, suggesting more efficient and less expensive modes of transportation, such as the U.S. Army's Motor Transport Service, which hauled about a fourth of the volume hauled by the railway to the Soviet border. Some British critics, including General Percy Sykes, opposed the railway because it ran north to south, rather than from west to east. The west to east route was preferred because it would allow the British direct access to their military bases in India and Mesopotamia, and at the same time, avoiding the threat of commercial loss of profit to Russia and any foreign rival.

There were also Iranians opposed to the building of the railway as well, believing that the money could instead be much more effectively used on roads.Clawson, pp. 241-243 However, if a cabinet minister was caught criticizing the extensive tax burden the railway produced, he could be placed in prison on counts of being a British collaborator, decidedly attempting to keep Iran backwards for his own financial and strategic goals.Abrahamian, p.77

While it may seem logical to attribute the reduction in transportation prices to the Trans-Iranian Railway, in reality it contributed minimally. Although much opposition to the railway was politically and financially motivated, the railway was an expensive tax-burden, costing Iran 2,195,180,700 rials through 1938–1939.Clawson, p. 243 The majority of capital used to fund the railway was provided through taxes on goods such as sugar and tea, produced in plants set up by the industries ministry, as part of Reza Shah's reform movement.

Construction In 1924, the American company Ulen negotiated with Prime minister Reza Khan (the later Reza Shah) an agreement to do a feasibility study for a railway line between Khorramshahr and the Caspian Sea.for the following cf DeNovo, John A: American Interests and policies in the Middle East, Univ of Minnesota 1963, p 297ff via google books

In the following years Reza who became Shah in 1925 had legislation passed in parliament which secured internal Iranian funding for the railway project from taxes levied on consumption of sugar and other goods thus excluding a new round of external debts that had bogged down the rulers of Iran before World War I.

In further negotiations it was agreed first to construct 2 test lines starting from the northern and the southern end of the projected Transiranian Railroad in order to establish cost for an agreement on the whole line. Against competing interests from other countries the Americans decided to form a joint venture with German companies.

From 1927 an international syndicate called "Syndicat du Chemin du Fer en Perse" consisting of the American Ulen and Company and a German "Konsortium für Bauausführungen in Persien" (formed by 3 German companies Philipp Holzmann, Julius Berger and Siemens BaunionPohl, 1999, pp. 189 ff) undertook the construction of the initial test lines. The Americans brought the line from Bandar Shahpur via Ahvaz up to Dezful. The German group started from the new harbour of Bandar Shah on the Caspian coast to the foothills of the Alborz mountains at Shahi (Qaem Shahr). The Americans terminated their contract in 1930 after delayed payments by the government resulting from a conflict with Reza Shah.In January 1930 the Shah undertook an inspection of the American part. After heavy rains the Shah's train twice went off the tracks and finally the tracks were washed away resulting in the king being forced to stay for days in Ahvaz until the rains subsided. Afterwards payment of due instalments stalled and Ulen terminated the contract. DeNovo p 300 f

In April 1933, Iran concluded a contract with the Danish firm Kampsax. Kampsax at that time was active in railway construction in Turkey and the Shah followed the Turkish recommendation which had the additional advantage of bringing in a company from a small country which posed no political risk for Iranian independence. Kampsax subcontracted the project in 43 lots to companies from Europe, the USA and Iran. Kampsax engineers supervised the works on each lot, the works being coordinated from the head office in Tehran. The contract required Kampsax to complete the line by May 1939. Kampsax completed the project under-budget and ahead of schedule, with it being formally opened throughout on 26 August 1938.Kauffeldt p. 167

The first official steam locomotive conductor to ride the line was an Iranian named Hossein Orang.Abrahamian, pp.72-73