China is preparing to put the brakes on gasoline and diesel cars.

The country, home to the world's largest auto market, is working on a plan to ban the production and sale of vehicles powered solely by fossil fuels, officials say.

The Chinese government is following in the footsteps of countries like India, France, Britain and Norway, which have already announced plans to ditch gas and diesel cars in favor of cleaner vehicles in the coming years.

Related: Ford will create new brand to make electric cars in China

Regulators haven't decided yet when the Chinese ban would take effect, but work has begun on a timetable, according to China's vice minister of industry, Xin Guobin.

He warned carmakers they need to adjust their strategies to the changing situation, according to state-run Chinese news agency Xinhua.

Authorities will offer subsidies of as much as half the retail price of electric and some hybrid vehicles to help buoy production, Xinhua reported, citing an official from the Chinese Finance Ministry.

Related: These countries want to ditch gas and diesel cars

The subsidies are good news for electric car manufacturers.

Dozens of models are already on sale in the world's second-largest economy. International auto giants like Ford (F), and Volkswagen (VLKAF) are aiming to develop fully electric cars in China. GM (GM) already sells the fully electric Bolt in the U.S. and the tiny Baojun 100 in China.

Tesla (TSLA) stock climbed 5% on news in U.S. trading Monday. Tesla sells only all-electric cars and is rolling out its first mass-market car, the Model 3.

The Chinese market is already dominated by domestic manufacturers like BAIC and BYD (BYDDF), which have aggressively pursued the electric vehicle business. BYD shares gained 4.6% in Hong Kong on Monday following the Chinese officials' comments about the potential ban over the weekend.

Chinese-owned Volvo (VOLAF) announced in July that every car it makes from 2019 onward will have an electric motor.

Related: GM is selling a $5,000 electric car in China

Plagued by air pollution, China has been swift to adopt the technology.

Last year, China accounted for more than 40% of the 753,000 electric vehicles sold worldwide, according to the International Energy Agency. That's more than twice as many as the number sold in the U.S.

But while electric sales are increasing fast in China, it remains an overwhelmingly gas and diesel dominated market.

Of the roughly 28 million vehicles sold in China last year, just over 1% were electric, according to the International Energy Agency. The agency defines electric cars as ones powered by batteries or hybrid cars that plug into the power source.

The Chinese government wants 5 million electric cars on the country's roads by 2020.