[1] It was not until in 1864 that the colonial government, under the command of L. A. J. W. Baron Sloet van de Beele, built the first railway line in Java.
They named the station Samarang or Samarang NIS as the starting point of the line to Tangoeng (Tanggung) via Allas-Toewa (Alastua) and Broemboeng (Brumbung) which was also among the oldest stations on a distance of around 25 km (16 miles)[clarification needed] and was opened on August 10, 1867, and inaugurated for public service in 1873.
In 1914, Samarang station was closed due to the frequent tidal floods and land subsidence which disrupted train operations.
The former Samarang station now is located at Kampung Spoorlan, Kemijen while the former building is buried as deep as 2 meters (6.6 ft) between densely populated houses.
At the start of their operation, the company had no profitable business prospects, so they submitted proposals to the colonial government for additional funding for the 166 km (103 miles) line to Yogyakarta (Lempuyangan) via Surakarta (Balapan).
On 1 November 1913, the Batavia NIS station was sold to Staatsspoorwegen (SS, "State Railways") along with the Buitenzorg–Batavia line and it was closed in 1929 after Batavia-Benedenstad (Jakarta Kota) had been built.
Likewise, the high-performance steam locomotives ordered from Werkspoor could not be delivered after the German occupation in June 1940.
For strategic reasons, the Solo-Gundih line was given a third rail to allow narrow gauge, 1,067 mm (3 ft 6 in), locomotives to operate from Semarang to Solo via Gambringan.
Although the locomotives were returned after the war, they fell into disrepair due to a regauging of the track to cape gauge size.