A US judge has approved one of the biggest corporate settlements on record, Volkswagen's $14.7 billion deal arising from its diesel emissions cheating scandal.
The German car maker also said it would begin buying back polluting cars in mid-November.
District Judge Charles Breyer in San Francisco signed off on VW's settlement with federal and California regulators and the owners of the 475,000 polluting diesel vehicles.
This marked a pivotal moment for the world's second biggest car maker as it tries to move past a scandal that has engulfed it for more than a year.
VW admitted in September 2015 to installing secret software in its diesel cars to cheat exhaust emissions tests and make them appear cleaner in testing than they really were.
In reality, the vehicles emitted up to 40 times the legally allowable pollution levels.
Volkswagen CEO Matthias Mueller told reporters in Berlin that Judge Breyer's approval was "an important milestone for us on the way towards clearing up the problem that we caused some time ago."
Hinrich Woebcken, president and CEO of Volkswagen Group of America, pledged to carry out the terms "as seamlessly as possible."
Judge Breyer turned away objections from car owners who thought the settlement did not provide enough money, saying it "adequately and fairly compensates" them.
Owners will get the pre-scandal "trade in" value of the vehicle and $5,100 to $10,000 in additional compensation.
"Given the risks of prolonged litigation, the immediate settlement of this matter is far preferable," Judge Breyer wrote.
Volkswagen agreed to spend up to $10.033 billion on the buybacks and owner compensation and $4.7 billion on programmes to offset excess emissions and boost clean-vehicle projects.
The settlement was reached with the US Justice Department, Federal Trade Commission, the state of California and vehicle owners who had filed a class action lawsuit against VW.
Volkswagen has admitted to misleading regulators and still faces an ongoing criminal investigation.
It represented the largest civil settlement worldwide ever reached with an car maker accused of misconduct.
While huge, the approved deal was still smaller than the $246 billion settlement reached by cigarette makers with 46 US states in 1998 and the $53 billion by BP to address costs and penalties arising from the 2010 Gulf of Mexico oil spill.
In total, Volkswagen has agreed to date to spend up to $16.5 billion in connection with the scandal, including payments to dealers, states and attorneys for owners.
The scandal rattled VW's global business, harmed its reputation and prompted the quitting of its CEO.
The settlement covers 2.0-litre polluting diesel Beetle, Golf, Jetta, Passat and Audi A3 cars from the 2009 to 2015 model years.
Up to 490,000 people will take part in the settlement because some vehicles had multiple owners.
Volkswagen spokeswoman Jeannine Ginivan said the company expects to begin buying back vehicles in mid-November. VW has hired 900 people, including one to be stationed at each dealership, to handle buybacks.
VW still faces billions more in costs to address 85,000 polluting 3.0-litre vehicles and Justice Department fines for violating clean air laws. It also faces lawsuits from at least 16 US states for additional claims that could hike the company's overall costs.
Last month, a Volkswagen engineer pleaded guilty in Detroit to helping the company evade US emission standards. His lawyer said he would co-operate with federal authorities in their criminal probe.
VW will provide $2 billion over 10 years to fund programmes to promote electric vehicle charging infrastructure, development of zero-emission ride-sharing fleets and other efforts to boost sales of cars that do not burn petroleum.
The company has been in intensive talks over how much compensation it may offer owners of the larger 3.0-litre diesel Porsche, Audi and Volkswagen vehicles that emit up to nine times legally allowable emissions and whether it will offer buybacks for some of the polluting SUVs.
No final agreement has been reached. Volkswagen faces a November 3 court hearing to update the court on those vehicles' status.
Volkswagen has also agreed to make up to $1.21 billion in payments to 652 US VW brand dealers and $600m to 44 US states to address some state claims.
Nearly 340,000 owners have registered to take part in the settlement. About 3,500 owners have opted out.
Volkswagen must fix or buy back 85% of the 475,000 vehicles under the agreement by June 2019 or face additional costs.