The Walschaerts valve gear is a type of valve gear invented by Belgian railway mechanical engineer Egide Walschaerts in 1844 used to regulate the flow of steam to the pistons in steam engines. The gear is sometimes named without the final "s", since it was incorrectly patented under that name. It was extensively used in steam locomotives from the late 19th century until the end of the steam era.
The Walschaerts valve gear was slow to gain popularity. The Stephenson valve gear remained the most commonly used valve gear on 19th-century locomotives. However, the Walschaerts valve gear had the advantage that it could be mounted entirely on the outside of the locomotives, leaving the space between the frames clear; which resulted in it being adopted in some articulated locomotives.
The first locomotive fitted with the Walschaerts valve gear was built at the Belgian Tubize workshops, and was awarded a gold medal at the 1873 Universal Exhibition in Vienna.
In 1874 New Zealand Railways ordered two NZR B class locomotives. They were Double Fairlie locomotives, supplied by Avonside; the first use in New Zealand of Walschaerts valve gear and probably the first time that a British manufacturer had supplied it. They were Cape gauge.
The Mason Bogie, a modified Fairlie locomotive of 1874, was the first to use the Walschaerts gear in North America.
The first application in Britain was on a Single Fairlie 0-4-4T, exhibited in Paris in 1878 and purchased by the Swindon, Marlborough and Andover Railway in 1883. According to Ahrons, the locomotive saw very little service as nobody seems to have known how to set the valves and this led to enormous coal consumption.