SAN FRANCISCO -- A federal judge in San Francisco has approved a $1.2 billion settlement with owners of about 88,500 Volkswagens with 3-litre diesel engines rigged to cheat on emissions tests.

Judge Charles Breyer gave the deal final approval during a hearing Thursday. The deal ends most of the litigation over VW's cheating scandal, which became public in 2015.

Owners of 3-litre models from 2009-2012 that can't be fixed to meet pollution standards will be offered buybacks. They also will get compensation from $7,755 to $13,880.

Those who own newer cars will get compensation of $7,039 to $16,114. If VW can't fix the newer cars, then the owners' attorneys can return to court to seek buybacks. That could push the value of the settlement to $4 billion.