Richard Trevithick, a British engineer and inventor, built and operated (1803–4) the first successful steam engine locomotive for hauling cars on a track. The British engineer George Stephenson built his first locomotive, the Blucher, in 1814, and in 1829 he demonstrated the practicability of the steam engine for commercial transportation; his locomotive, the Rocket, attained 29 mi per hr (47 km per hr). The first American-built locomotive was designed and tested on a private track by the American engineer John Stevens in 1826. The English-built Stourbridge Lion, imported c.1829, was not a commercial success, being too heavy for American tracks.
The Tom Thumb (1830), built by Peter Cooper, an American manufacturer, for the Baltimore & Ohio RR, was the first practical American-built locomotive. The American manufacturer Matthias Baldwin's first locomotive, Old Ironsides, built in 1832, long remained in operation. In 1832 the American engineer John B. Jervis built the first locomotive with a swivel truck, a wheel assembly on which part of the body was mounted. Placed at the forward end of a locomotive, a swivel truck permitted a locomotive to negotiate curves more safely. In 1865, Robert F. Fairlie produced an articulated (jointed) locomotive that could traverse the sharp curves of passes through the western mountains. Electric locomotives were introduced on the Baltimore & Ohio RR in 1895, and diesel locomotives—introduced in yard service in 1924—were in general use by 1935.