A petrol engine (known as a gasoline engine in North America) is an internal combustion engine with spark-ignition, designed to run on petrol (gasoline) and similar volatile fuels. It was invented in 1876 in Germany by German inventor Nicolaus August Otto. In most petrol engines, the fuel and air are usually pre-mixed before compression (although some modern petrol engines now use cylinder-direct petrol injection). The pre-mixing was formerly done in a carburetor, but now it is done by electronically controlled fuel injection, except in small engines where the cost/complication of electronics does not justify the added engine efficiency. The process differs from a diesel engine in the method of mixing the fuel and air, and in using spark plugs to initiate the combustion process. In a diesel engine, only air is compressed (and therefore heated), and the fuel is injected into very hot air at the end of the compression stroke, and self-ignites.