The Mount Washington Cog Railway was the world's first cog railway (rack-and-pinion railway). It climbs Mount Washington in New Hampshire, USA. The railway is still in existence today, using steam locomotives as it always has (most dating to the 19th century).
It was built by Sylvester Marsh, who came up with the idea while climbing the mountain in 1857. After his idea was thought insane, he put up $5,000 of his own money and developed a prototype locomotive and a short demonstration section of track. After this demonstration, he found investors and started construction. Although not yet finished, the first paying customers rode in 1868, the summit being reached in 1869.
The early locomotives all had vertical boilers, like many stationary steam engines of the time; the boilers were mounted on trunnions allowing them to be held vertically no matter what the gradient of the track. Later locomotives used horizontal boilers, slanted so they remain horizontal on steeply graded track.
Locomotives push single passenger cars up the mountain. Both locomotive and cars have a ratchet and pawl mechanism engaged during the climb that prevents any roll-back; during descent, both locomotive and car are braked.
The only major accident in the railway's history was when the first locomotive, #1 (first named Hero and later Peppersass because of its vertical boiler's resemblance to a pepper sauce bottle) was brought out of storage in 1929 for one last run before being put on display. During the ascent, the locomotive's cog wheel broke and the locomotive jumped off the tracks and then, with no means of braking, descended the mountain at high speed. All but one of its crew jumped to safety (though some suffered broken bones) but one man did not escape and died. Although the locomotive was broken into pieces the boiler did not rupture, and the pieces were later reassembled to reconstruct the locomotive for static display.
The rack rail design used is one of Marsh's own invention, using a ladder-like rack with open bar 'rungs' engaged by the teeth of the cog wheel. This system allows snow and debris to fall through the rack rather than lodge in it. A very similar system was invented in Switzerland and named the Riggenbach rack.