Germany's BMW plans to be able to mass produce electric cars by 2020 and offer 12 different models by 2025 as traditional carmakers seek to gain share in a market dominated by U.S. upstart Tesla.

A global crackdown on diesel cars in the wake of Volkswagen cheating on emissions tests has raised pressure on carmakers to quickly develop electric alternatives.

BMW, which includes the Mini and Rolls-Royce brands and sold 2.34 million cars last year, announced its shift into more electric cars on the same day as smaller rival Jaguar revealed it would offer electric or hybrid variants of all its models by 2020.

On Wednesday Nissan unveiled a new version of its Leaf electric vehicle, in its latest move to take on Tesla, the U.S. firm co-founded by Elon Musk which sold 83,922 vehicles last year.

Germany's BMW, which launched the i3 electric car in 2013, said it is readying its factories to mass produce electric cars if demand for battery driven vehicles takes off.

"By 2025, we will offer 25 electrified vehicles 12 will be fully-electric," BMW Chief Executive Harald Krueger told journalists in Munich, adding that electric cars will have a range of up to 700 kilometers (435 miles).

The Frankfurt motor show, which starts next week, will be used to unveil a new four-door electric car positioned between the i3 city car and the i8 hybrid sportscar, Krueger added.

"We will be increasing the share of electrified models across all brands and model series. And, yes, that also includes the Rolls-Royce brand and BMW M vehicles," Krueger explained.

BMW is investing in its factories to enable all of its models to be equipped with all variants of powertrain by 2020, including fully electric motors.