The usual answer focuses on British inventors like Thomas Newcomen, or Thomas Savery. They were both active in the late 17thC.
But there's also a much earlier, Spanish claimant... (Thread)
antonhowes.substack.com/p/age-of-inven…
He managed the Spanish royal mines, and in the late 16thC invented a host of devices, from diving equipment and mine ventilation systems, to improved mills, pumps, and furnaces.
But did he really beat Savery to it? Well, it depends on what you mean by "steam engine".
One of these was intended to remove deadly gases from mines (which had killed one of his friends, and almost killed him too).
Ayanz seems to have even tried to build one in c.1608-11 at the silver mines of Guadalcanal.
Because Savery and Newcomen exploited the remarkable discovery that the air had a weight.
The resulting partial vacuum meant that it was the weight of the air that did the real lifting work.
(Or rather, that's what it seems like. In fact, the atmospheric pressure - the weight of the air - pushes the water to fill the vacuum caused by the steam's condensation).
It's a crucial difference.
Ayanz did not even consider the possibility of exploiting atmospheric pressure.
It's actually a great and very clear case of how the lack of science limited the technological possibilities.
But at least, unlike Ayanz, Savery was on the right track.
But he did not - could not - invent the atmospheric engine that changed the modern world.
More here: antonhowes.substack.com/p/age-of-inven…