In 1912-1913 a provisional narrow-gauge (600 mm) line was built from Liepaja to , intended for the transportation of stones to the Port of Liepāja, and at the beginning of the First World War - a narrow-gauge line between Pāvilosta and Alsunga. On June 6, 1928, the Latvian Seim adopted a resolution on the construction of a narrow-gauge line Liepaja - Ziemupe - Pāvilosta - Alsunga (Alshvanga), but a little later it was decided that the line passing through such sparsely populated areas would be unprofitable and the line to Alsunga was planned to be built through , from track 750 mm. The line was ready on August 14, 1932, and in order not to make a detour, they did not start it in Pāvilosta, which was later connected to the line by a 3-kilometer branch from Upenieki station (since 1933 - Kursa). In 1933, it was decided to extend the line to Kuldiga and on September 1, 1935, the Alsunga - Kuldiga section was put into operation. In 1939, construction began on the Tukums - Kuldiga section. Before the start of World War II, only 8 km of track had been laid from Tukums II station.
