The narrow-gauge railway between Valka and Ape was opened in 1900. 
After the birth of Republic of Estonia and Republic of Latvia in 1918 and splitting Valga and Valka between the countries the first kilometres of the railway that is mostly on the territory of Estonia was located in Latvia. In a few years a parallel railway exiting Valga towards Ape was constructed on the territory of Estonia, because Estonians did not want to pay Latvian for the use of the railway. The two railways meet near Koikküla, ca 13 km from Valga. 
The last trains rode between Valga and Ape in 1970.
Today most of the old railway causeways that pass picturesque landscapes and forests of southern Estonia and northern Latvia are turned into trails for walking and cycling.
The trails run mostly on gravel and surface roads. From Valka to Žuldini and from Koikküla to Hargla the trail is on bigger roads, as the old railway has become mostly impassable in these sections.
The trails are signposted and there are a lot of historic photos and newspaper articles by the trail. 
NB! The signing and road works on Valga - Kaagjärve - Koikküla section will take place in summer 2019.
Detailed info on pdf and Google map.