Image copyright Mazda Image caption Mazda's new petrol engine, "the sustainable Zoom-Zoom 2030", the world's first commercial gasoline engine to use compression ignition

Japanese carmaker Mazda has developed a more efficient petrol engine at a time when the industry steers toward electric vehicles.

It said the compression ignition engine was up to 30% more fuel-efficient than its current engines.

It plans to sell cars with the new engine from 2019.

Last week, Mazda said it would work with Toyota to develop electric vehicle technology and build a $1.6bn plant in the US.

Mazda research and development head Kiyoshi Fujiwara said it was imperative for the company to pursue the "ideal internal combustion engine".

"Electrification is necessary but... the internal combustion engine should come first," he said.

Mazda said the Skyactiv-X, as it is known, would be the world's first commercial petrol engine to use compression ignition.

The technology breakthrough puts the firm ahead of rivals including Daimler and General Motors that have worked on compression ignition for decades.

According to Mazda, the fuel-air mixture ignites spontaneously when compressed by the piston in the new engine.

The carmaker said the Skyactiv-X combined the advantages of petrol and diesel engines to improve efficiency.

It has no plans to supply the engine to other carmakers.

Electric ambitions

The move comes as the car industry pours massive investment into electric technology in response to stricter emissions standards around the world.

The UK will ban the sale of new petrol and diesel cars by 2040 in a bid to reduce air pollution.

In July, Volvo said all new models will have an electric motor from 2019. The Chinese-owned firm aims to sell one million electric cars by 2025.

Mazda also plans to introduce electric technology in its cars from 2019.

Analysis: Theo Leggett, business reporter

In theory, a compression-ignition petrol engine should have big advantages. But it isn't easy to make technology work - and some of the biggest companies, including General Motors, have already tried.

So why should a relatively small Japanese manufacturer like Mazda succeed? Well, partly because - unlike the really big players - it isn't afraid to take risks. It has done in the past.

It's the only mainstream manufacturer, for example, which has persisted with rotary engines in its cars. Like compression ignition motors, they have theoretical benefits, but create complex engineering challenges.

Mazda's rotary has had some success. The company won the Le Mans 24 Hours race with it in 1991, and the latest version was fitted in its RX-8 sportscar. Popular with drivers, it was sadly unreliable.

If the new motor is to be a success, it needs to be reliable as well as efficient. And Mazda needs to be able to persuade regulators that petrol engines still have a strong future.

It may prove to be the perfect stop-gap, as electric cars are developed and charging infrastructure is created.

Or it may turn out to be a brilliant idea, which has come to fruition just a few years too late.

Dale Gillespie, from Jennings Motor Group, said "With the clean air crackdown causing a decline in demand for new Diesel cars this is refreshing news from Mazda. It is an approach all manufacturers should be adopting."