FRANKFURT - German automaker BMW is taking a majority stake in its China joint venture and investing 3 billion euros ($3.5 billion) in factories there, underscoring the importance of the Chinese market as the company prepares to meet increased demand for electric vehicles.

Munich-based BMW said Thursday it would pay 3.6 billion euros ($4.2 billion) to raise its stake in BMW Brilliance Automotive Ltd. to 75 percent from 50 percent.

Alongside the deal, BMW will invest in new and existing plant facilities in Shenyang, increasing production capacity to 650,000 vehicles a year from the early 2020s. The plants produced 400,000 vehicles last year.

A new plant will be able to produce fully electric, partly electric, and conventional vehicles on the same line.

The Chinese government has issued a new energy vehicle mandate which uses a system of credits to push automakers to increase the share of battery-only and hybrid cars in their sales mix. The policy is expected to increase the number of electrically powered vehicles in the world’s largest car market in coming years. Last year, battery-only and hybrid cars were 2.2 percent of the Chinese market; the International Council on Clean Transportation estimates that could rise to around 4 percent by 2020 under the policy.

The country is BMW’s single largest sales market, with 560,000 vehicles sold there last year.

The deal is subject to approval by regulators and shareholders of Chinese partner Brilliance China Automotive Holdings Ltd.

BMW is taking advantage of the Chinese government’s plans to end the requirement that foreign auto manufacturers enter into joint ventures with local partners in order to make cars in China. The BMW-Brilliance deal is scheduled to close in 2022, the year the requirement ends.

“With continuous investment, as well as the development and production of electric vehicles, we underline China’s importance as a dynamic growth market for us,” BMW CEO Harald Krueger said in a statement.