The 1680 the Dutch scientist Huygens created the first “internal combustion engine”. Interestingly it was powered by gunpowder. Admittedly it wasn’t an especially effective or useful tool, but it laid the foundations for future reciprocating steam engines and later conventional fueled “otto” cycle engines.
The genesis of Huygens engine can clearly be seen to be a cannon. Here’s how it worked. A smooth sided cylinder is mounted vertically. At the base is a small gunpowder charge. At the top of the cylinder are two leather cylinders attached to apertures in the main cylinder providing the ability to receive expanding hot gas from the explosion of the gunpowder. Above the leather sleeves was a heavy piston with a form of obturation ring around it. The gunpowder charge is initiated, and the cylinder fills with hot gases, as does the leather sleeves . At once atmospheric pressure works on the leather sleeves, and the gases in the main cylinder begin to cool. The drop in pressure created by the cooling gases pulls the piston down as a vacuum would. Attached to the piston via a pulley is a rope which then is used to mechanically lift any object.
To be clear, this engine does not “reciprocate” as a modern engine does, it is limited to a single stroke downwards from the low pressure in the cylinder. It is important to understand that the engine does not work by the explosion driving the piston upwards, it works by the subsequent drop in pressure (vacuum) in the main cylinder.
In 1682 a working version was produced that enable Huygens to lift “seven or eight small boys” in to the air. Always a useful thing to do….
Seriously though, it appears that Huygens work in understanding explosives and the nature and characteristics of the hot expanding and subsequently cooling gases was an important step towards development of steam engines in the 1700s and “modern” internal combustion engines in the late 1800s.