The first railway in Sudan opened in the 1870s paralleling the River Nile for about 54km south from Wadi Halfa. Intended as a trade route it was taken over for war purposes and twice extended, but abandoned in 1905. It was built to 3ft 6in (1067mm) gauge, which may have reflected the ambitious but never achieved dream of Cecil Rhode's for a line running the length of Africa from the Cape of Good Hope to Cairo, of which the Sudanese line would have formed part.
The next railway in Sudan was a military line opened in the 1890s between Wadi Halfa and Abu Hamad. It shared the 3ft 6in (1067mm) gauge of the earlier line so that equipment could be used in common. It was later extended to Atbarah and, after General Kitchener's defeat of the Mahdiyah, to Khartoum, which it reached at the end of 1899. The line was then turned over to commercial use and formed the basis of the present day network.
Further extensions to the 3ft 6in (1067mm) gauge network continued through the first half of the twentieth century, culminating in a network of around 4700km. Meanwhile, a group of 2ft (610mm) gauge lines opened in the 1920s for the construction of canals as part of the Gezira scheme had expanded into a 700km network serving agricultural communities at the confluence of the Blue Nile and the White Nile near Khartoum.
The railways went into an economic decline from the late 1960s / early 1970s and suffered further depradations during civil war from the 1980s. Work is in hand to rehabilitate and modernise the network, but continues to be hampered in some areas by civil unrest.
There were no international connections until 2011, when the creation of the Republic of South Sudan resulted in a new boundary on the Khartoum to Wåu line, between Babanusa and Aweil.
In 2020, a feasibility study was initiated for a new 1522km standard (1435mm) gauge railway from Port Sudan via Khartoum to Addis Ababa in Ethiopia.
Also in 2020, a feasibility study was initiated into a standard gauge line connecting Wadi Halfa with the Egyptian Railways network, via Abu Simbel. Initially, there would be a break of gauge at Wadi Halfa, but conversion to standard gauge of the line from Wadi Halfa to Khartoum is envisaged for the future. In 2021, both governments recommitted to the project, although no date has been given for the start of construction.