A cogwheel or rack railway is a steep grade railway with a toothed rack rail between the running rails. The trains are fitted with one or more cog wheels or pinions that mesh with the rack rail. Continental Europe's first cogwheel railway was designed and built by Niklaus Riggenbach between Vitznau and Rigi in Switzerland, and the line was inaugurated in 1871, according to MTVA's press archive.
Count Odon Szechenyi, the initiator of the Buda Castle Hill funicular, proposed the idea of a cogwheel railway running up the top of Svabhegy (the terminal is on Szechenyi-hegy today) in the Buda Hills after he had seen Riggenbach's mountain rack railway. Svabhegy was a popular destination for hiking and recreation among the residents of Best-Buda, but even after the Austro-Hungarian Compomise of 1867, it was only accessible on foot or by horse-drawn cart.
The concession contract with Riggenbach's company was signed on May 21, 1873, and the construction was entrusted to the Swiss-born engineer Ferenc Cathry Szalez. The railway was completed in less than a year: the world's third Riggenbach steam railway was put into service on June 24, 1874.
The single-track cog railway on a standard gauge was 2883 meters in length with a difference in elevation of 264 meters between the two terminals. The trains left from the terminal in Ecce Homo meadow (now called Varosmajor park), went along a valley called Dios-arok to reach the terminal on top of Svabhegy. The three-meter-long rack rods, which were attached to the track axle by a strap, were held in place by two rail bolts on each sleeper. The cogwheel railway service was operated with steam locomotives pushing two or three carriages uphill at a speed of 12 kilometers and hauling them downhill at a speed of 7.2 kilometers. Three steam locomotives, ten open passenger carriages and two low sided open freight cars were procured for operating the cog railway.
Initially running only between April and October, the cogwheel railway was mostly used by hikers, but it was also used for freight transport. From the beginning, it was criticized, partly for its route and partly for its high ticket prices. Efforts were made to increase the number of passengers by lowering the fares and offering discounts. The line was extended to Szechenyi-hegy in 1890, increasing its length to 3,733 meters. From 1910, the cogwheel railway service also operated in winter, and it was possible to transport heavy freight wagons loaded with building materials or fuel.
When the concession expired in 1926, the cogwheel railway was taken over by the Budapest municipal transportation company BSzKRt. Railway electrification was started in 1927, and the polluting steam locomotives were replaced by Ganz electric locomotives as part of the comprehensive upgrading of the line.
Old trackage was replaced by heavy-duty rails, overhead wires were built, and electrically powered vehicles were purchased. The speed limit was increased to 13.5 km/h, and trains were scheduled to run every 15 minutes instead of every 30 minutes.
During World War Two, from late 1944 to mid-1945, the cogwheel railway trains did not run, later they transported wood from the hills to the city. Freight traffic stopped over time, and some people even suggested discontinuing the service due to the growing number of buses. The cogwheel railway was eventually saved and became a test case for public transport on vehicles without a conductor to collect fares on board. On December 4, 1961 KN signs (meaning no conductor on board) first appeared on rack railway trains.
The cog railway was taken over by the Budapest Transport Company (BKV) in 1968, and in 1973 the line was completely rebuilt to celebrate the 100th anniversary of the merger of Buda, Pest and Obuda into Budapest. The track was renewed replacing the Riggenbach system with the Strub cogwheel system, the line voltage was increased to 1,500V, high platforms were built at the stations, a new station was built at the Janos hospital, the terminal at Varosmajor was rebuilt, and new types of engines and carriages were purchased. The past decades saw numerous renovations and upgrades: a computer-controlled security system was installed in 1992 and cyclists can also use the service since 1993.
The cogwheel railway (formally tram number 60 since 2008) is currently facing serious challenges in terms of technology and traffic. Regular maintenance is carried out to ensure its safe operation until funds are available for fully upgrading the cog railway service.