With the cost of horse fodder skyrocketing because of the Duke of Wellington's requirements in the Peninsular War, the manager of Middleton Colliery wanted a cheaper way to move coal from the mine to his outlet in Leeds. And he realised the answer lay beneath his feet.
He ordered Leeds steam-engine manufacturers Fenton, Murray and Wood to build him a locomotive, and he and the firm's engineer Matthew Murray - at the time a major rival to James Watt - teamed up in 1811 to build the engine for a wagonway that had connected the colliery with Leeds Bridge since 1758.
With Richard Trevithick's experience at Penydaren fresh in his mind, Blenkinsop opted to make his engine as light as possible, but feared this might cause problems with adhesion of the wheels on the track.
Accordingly, he invented a rack-and-pinion system in which gear teeth on the driving wheel of the engine meshed with a rack on one side of the rails, like many modern Swiss mountain railways. After patenting the system, he persuaded his employers, the mine owners, to adopt it.
The first engine, believed to have named after the Prince Regent, made its first public appearance on June 24th, 1812. It weighed five tons, had two vertical cylinders inside the top of the boiler to preserve heat - Murray's idea - and could haul 90 tons at 4mph on a level track.
Although there was a rack on only one side of the track, the engine, and its successors, had a cogwheel on either side, so the machines could be turned regularly to even out wear. Nevertheless, wear on the gearing was a problem that dogged Blenkinsop's line for twenty years.
A second engine made its debut at the official opening of the line on August 12th, 1812, and it was christened Salamanca in honour of a British victory in a Peninsular War battle that had taken place precisely three weeks earlier.
The engines cost £380 each to build and proved expensive to run, but the costs were bearable because they replaced no fewer than 50 horses and an estimated 200 men. They were still in use at the colliery well into the 1830s.
Three more were built by Robert Daglish for Orrell colliery, near Wigan, between 1812 and 1816. When Blenkinsop died in 1831, his engines were still in everyday use.