The first person to experiment with an internal-combustion engine was the Dutch physicist Christian Huygens, about 1680. But no effective gasoline-powered engine was developed until 1859, when the French engineer J. J. Étienne Lenoir built a double-acting, spark-ignition engine that could be operated continuously. In 1862 Alphonse Beau de Rochas, a French scientist, patented but did not build a four-stroke engine; sixteen years later, when Nikolaus A. Otto built a successful four-stroke engine, it became known as the "Otto cycle." The first successful two-stroke engine was completed in the same year by Sir Dougald Clerk, in a form which (simplified somewhat by Joseph Day in 1891) remains in use today. George Brayton, an American engineer, had developed a two-stroke kerosene engine in 1873, but it was too large and too slow to be commercially successful.
In 1885 Gottlieb Daimler constructed what is generally recognized as the prototype of the modern gas engine: small and fast, with a vertical cylinder, it used gasoline injected through a carburetor. In 1889 Daimler introduced a four-stroke engine with mushroom-shaped valves and two cylinders arranged in a V, having a much higher power-to-weight ratio; with the exception of electric starting, which would not be introduced until 1924, most modern gasoline engines are descended from Daimler's engines.