The public railway company
Staatsspoorwegen constructed the line in 1899 and 1900 as part of the Western Railways ()
to enhance connectivity with western
Java. On 2 January 1899, the first
part was opened between Batavia Zuid (
Jakarta Kota) and
Tangerang. Until 12 September 1923, this line started from Batavia Zuid, headed west across the street via Pasar Pagi (current day Petongkangan street), turned south to
Angke after which the railway followed the current route via
Duri. Due to the narrow streets downtown, the new railway from 1923 went around the city on partially elevated tracks. The original plan for this included a rail curve starting from Batavia station going east and curving 180° north- and westwards. Because of the higher costs however, the line was to go east to
Kampung Bandan after which trains would have to revert onto the new railway going northwest around the old downtown area. This is the situation as it remains today. The railway stretch from Duri to
Rangkasbitung was completed on 1 October 1899, to
Serang on 1 July 1900, and the final extension to
Anyer Kidul on 20 December 1900. Part of the railway up to
Rangkasbitung is electrified with 1.5 kV
overhead lines.
Branch lines The following railways branch off the Jakarta Kota-Anyer Kidul mainline: •
Duri-Tangerang railway - opened together with part of the mainline on 2 January 1899. •
Tanah Abang-Kramat railway - opened between 1 March 1904 and 1 August 1922. •
Tanah Abang-Manggarai railway - opened on 1 August 1922. •
Rangkasbitung-Labuan railway - opened on 18 June 1906. •
Krenceng–Merak railway - opened on 1 December 1916. ==Stations==