The first rail line on the present-day territory of Serbia was inaugurated on 20 August 1854, between Lisava-Oravica-Bazijaš and the train operated on horse-drawn traffic which was replaced in 1856 by steam locomotives.
However, the major expansion began after the Berlin Congress and the independence of the, theretofore vassal to the Ottomans, Principality of Serbia during the second half of the 19th century.
The first train departed from Belgrade to Niš on 23 August 1884, which is considered by Serbian Railways as the official year when the company was created.
[citation needed] This was not the first operational railway on the territory of then-Kingdom of Serbia, though, as the one in opened in 1882, a primarily industrial, though occasionally used for passenger transport, 12 km (7.5 mi) long 600 mm (1 ft 11+5⁄8 in) wide gauge track from Majdanpek copper processing plant to Velike Livade (a former village taken over by the plant) and constructed by the Serbian Copper & Iron Co. (official name in English, most stockholders were British) had its first run on the track in June 1882.
[8] Another one in Eastern Serbia followed suit in 1888, the 80 km (50 mi) long dual purpose (industrial and passenger transport) 760 mm (2 ft 5+15⁄16 in) track from Vrška Čuka mine to the port of Radujevac on the Danube, built by the Societé Anonyme "L'Industrielle Serbe" registered at Brussels in Belgian, French, (Austro-)Hungarian, and Serbian ownership (in order of the percentage of stock owned).
During the 1990s, following the dissolution of the Socialist Federal Republic of Yugoslavia, railways in Serbia suffered the lack of maintenance of infrastructure and the level of traffic, especially cargo, decreased dramatically.
[12] Those three companies, fully separated and independent from the Serbian Railways were founded on 10 August 2015, in the process of reconstruction and better optimization of business.