WASHINGTON (Reuters) - German automaker Volkswagen AG VOWG_p.DE will pay as much as $15.3 billion after admitting it cheated on U.S. diesel emissions tests for years, agreeing to buy back vehicles from consumers and provide funding that could benefit makers of cleaner technologies.

The largest-ever automotive buyback offer in the United States came in a deal announced on Tuesday by the Justice Department, Federal Trade Commission, Environmental Protection Agency and California state regulators. The proposed consent decree confirmed that VW will set aside $10.033 billion to cover buybacks or fixes for diesel cars and sport utility vehicles that used illegal software to defeat government emissions tests.

VW admitted in September that it installed secret software that allowed U.S. vehicles to emit up to 40 times legally allowable pollution. VW still may face criminal charges and oversight by an independent monitor, a person briefed on the matter said.

A criminal settlement could include measures to ensure VW would not engage in further cheating.

Shares of VW rose as much as 5 percent on Tuesday, and closed up 1.7 percent at 107.85 euros.

“We didn’t follow a multiyear, grind-it-out litigation strategy, which would have been counterproductive for Volkswagen,” said Robert Giuffra Jr., VW’s lead lawyer. “We moved with lightning speed to settle with our federal and state regulators and the private plaintiffs.”

Under the Justice Department deal, VW will provide $2 billion over 10 years to fund programs directed by California and EPA to promote construction of electric vehicle charging infrastructure, development of zero-emission ride-sharing fleets and other efforts to boost sales of cars that do not burn petroleum.

VW also agreed to put up $2.7 billion over three years to enable government and tribal agencies to replace old buses or to fund infrastructure to reduce diesel emissions.

The settlement covers 475,000 2.0-liter diesel Jetta, Beetle, Audi A3, Golf, and Passat vehicles from the 2009-2015 model years.

VW also announced a separate settlement with 44 U.S. states, the District of Columbia and Puerto Rico that will cost at least $600 million, bringing the total to as much as $15.3 billion.

Deputy U.S. Attorney General Sally Yates said a criminal investigation remained active. “We’re looking at multiple companies and multiple individuals,” she said.

A VW sign is seen outside a Volkswagen dealership in London, Britain November 5, 2015. REUTERS/Suzanne Plunkett/File photo

“By duping regulators, Volkswagen turned nearly half a million American drivers into unwitting accomplices in an unprecedented assault on our environment,” she added.

The EPA is investigating other automakers for potential emissions problems. EPA Administrator Gina McCarthy said the agency “will be releasing information as it becomes available.”

VW still faces criminal investigations in Germany and other countries, and lawsuits from investors around the world.

The company planned a multi-billion-euro investment program to introduce more than 30 fully electric cars by 2025.

FIX OR SELL

Owners have until late 2018 to decide whether to sell the vehicles back.

The deals would move VW close to the 16.2 billion euros ($18 billion) it has set aside to cover costs of the scandal.

But spending on buybacks could be much less if regulators approve fixes and owners opt for repairs. Most owners will get $5,100 to $10,000 in compensation, including the pre-scandal value of the cars, documents filed on Tuesday said.

The company expects to begin buying back vehicles in October, when a U.S. judge is expected to give final approval to the settlements, and is to start proposing fixes in November.

VW cannot resell or export vehicles it buys back unless the EPA approves a fix, the documents said. Volkswagen must repair or buy back 85 percent of the 475,000 vehicles by June 2019 or face penalties of $100 million for every percentage point below that figure.

The agreement does not lift a ban on sales by VW of its U.S. 2016 diesel vehicles. Nor does it cover fees for lawyers of owners suing the company or address 80,000 larger polluting 3.0 liter Porsche, Audi and VW diesel cars.

VW could also face billions in additional costs if it is forced to buy back the 3.0 liter vehicles. VW will likely face significant yet-to-be determined fines under the U.S. Clean Air Act for emissions violations.

The settlement does not resolve lawsuits filed last year by owners against German auto supplier Robert Bosch GmbH, which was accused of conspiring with Volkswagen to evade emissions standards.