German auto giant Volkswagen AG (NASDAQOTH:VLKAY) warned on Friday that it will take a surprise one-time charge of about 2.5 billion euros ($3 billion) against its third-quarter earnings, as its efforts to buy back or repair diesel-powered vehicles in North America have proven more costly than it had expected.

Wall Street analysts polled by Bloomberg had expected VW to report an operating profit of 4.45 billion euros for the third quarter, on average, before the charge was announced. 

A Volkswagen 2.0 liter "TDI" turbo-diesel engine of the type implicated in its global emissions-cheating scandal.

VW will take a new $3 billion charge related to its efforts to buy back or repair about 482,000 vehicles in the U.S. powered by its 2.0 liter "TDI" diesel engine. Image source: Volkswagen AG.

What VW said: A big charge related to its U.S. diesel settlement

In a terse statement, VW said that "additional provisions" to its plan to buy back or retrofit vehicles powered by its 2.0 liter "TDI" turbodiesel engines will "burden" its third-quarter operating results to the tune of about 2.5 billion euros.

The company said that the program to repair or repurchase the diesel-powered cars "is proving to be far more technically complex and time consuming" than it had anticipated.

VW plans to release its third-quarter results on Oct. 27.

The background: VW is struggling to fix its dirty diesels

It has been just over two years since the world learned that VW had been using software that allowed its diesel engines to cheat on emissions testing. About 11 million vehicles worldwide were said to have been fitted with the software, with just over half a million of those in the United States. About 482,000 vehicles in the U.S. had the 2.0 liter engine (the remainder had a different diesel engine, a 3.0 liter V6).

At that time, VW said that it would set aside 6.5 billion euros to cover the costs of bringing the affected vehicles into compliance -- but the bill has grown significantly since then, in part because U.S. regulations around diesel-engine emissions are much stricter than those in Europe.

In June 2016, VW agreed to a $15.3 billion settlement with U.S. authorities. Under that deal, VW agreed to offer to buy back the 482,000 vehicles with the 2.0 liter diesel engine at their values in September of 2015, right before the scandal broke. Alternatively, owners could choose to have their cars repaired to comply with the Clean Air Act. (The vehicles with the 3.0 liter engines were covered by a separate settlement last December.) 

Many owners have chosen to sell their cars back to VW (or for leased vehicles, to end their leases early without penalties). But some owners have opted to keep their diesel VWs, meaning that VW is legally obliged to recall and repair them. 

It appears that VW is having trouble coming up with a repair that will pass muster with regulators at the U.S. Environmental Protection Agency (EPA) and the powerful California Air Resources Board (CARB). VW and the regulators may also be in disagreement over what the company should do with the thousands of vehicles it has already bought back, many of which are sitting in vast parking lots in Michigan. 

That seems to be what is driving this new $3 billion charge.

Mueller is shown seated before a big glass window at Volkswagen's headquarters in Wolfsburg, Germany.

This $3 billion surprise charge raises tough questions for VW CEO Matthias Mueller. Image source: Volkswagen AG.

VW's Dieselgate bill now stands at $30 billion -- and counting

The $3 billion charge is a huge number given the total number of vehicles involved in the U.S.: It's roughly $6,200 per vehicle. It brings the total hit to VW from the Dieselgate scandal to about 25 billion euros, or roughly $30 billion. 

And it has to make embattled VW shareholders wonder: Where is the end of all this -- and does CEO Matthias Mueller have it under control?

I don't expect answers to either question to be forthcoming from VW anytime soon. 

John Rosevear has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.