The Transcaucasus Railway was connected to the rest of the Russian system in 1900, when the line from Baku to Makhachkala was completed.
In 1902, the narrow gauge Borjomi to Bakuriani Railway was built to serve the skiing community in the region.
To support campaigns further into Ottoman territory, a 750 mm (2 ft 5+1⁄2 in) gauge railway was built from Sarıkamış to Erzurum in 1916 and extended to Yeniköy later the same year.
With the dissolution of the Russian Empire, a 147 km part of the Julfa-Tabriz line was acquired by the Persian Railways.
The Ottoman Empire lost, along with the Central Powers, giving northeastern Anatolia to Armenia.
In 1919, the Turkish War of Independence broke out and northeastern Anatolia was taken back by the Turks, this time as the Republic of Turkey.
The Treaty of Gümrü was signed on December 2, 1920 setting the present day borders of Turkey.
In 1924 the railway started building a line from Baku, south to Alyat, Shirvan and to the port city of Neftchala.
In 1941 the railway built two lines: one from Shirvan to Julfa and one from Salyan to Astara on the Azerbaijan-Iran border, thus connecting with the Iranian system.