In June of 1812 the Middleton Railway of Leeds England became the first commercial railway in the world to successfully use steam locomotives. John Blenkinsop patented and laid track with a toothed rail. Matthew Murray designed and built a locomotive with a pinion to mesh with the rail.