Volkswagen has reached a £193m settlement with UK drivers involved in a class action lawsuit over the so-called dieselgate scandal in 2015.
The German carmaker, which had refused to compensate the owners of diesel models affected in the UK, citing EU law, faced claims brought on behalf of more than 100,000 people by several legal firms.
More than 91,000 people in England and Wales will receive payouts.
The action involving claimants from Scotland is at an earlier stage of the legal process.
The Volkswagen NOx Emissions Group Litigation was granted in 2020 when the High Court ruled that emissions-testing software, installed in diesel-powered vehicles that was designed to cheat emissions testing regimes, amounted to unlawful "defeat devices".
The claimants argued that the VW Group, which also includes the Audi, Seat and Skoda brands, and dealerships misled consumers as nitrogen dioxide levels were lowered under the lab conditions used at the time.
At the height of the dieselgate scandal, it was claimed in the US that vehicles were emitting up to 40 times the legal limit of nitrogen dioxide when out on the road.
Lawyers said the case amounted to the biggest consumer group action ever to be brought before the English courts.
It was due to go to trial next January.
But VW, which made no admission of liability under the terms of the settlement, said it decided to bring the matter to a conclusion over fears of a protracted and costly legal battle.
The company is to make a separate contribution to the claimants' legal costs and other fees.
The issue first came to light in September 2015 when the company admitted that 11 million vehicles worldwide, including almost 1.2 million in the UK, had been fitted with the software.
It has since cost the company tens of billions of pounds in fines and civil settlements in the US - on top of recall costs elsewhere.
Philip Haarmann, chief legal officer at VW, said: "The Volkswagen Group is pleased that we have been able to conclude this long running litigation in England & Wales.
"The settlement is another important milestone as the Volkswagen Group continues to move beyond the deeply regrettable events leading up to September 2015."
Slater and Gordon, the firm representing the bulk of the claimants, said it was "delighted to have secured such a significant financial settlement for many thousands of Volkswagen Group car owners".
It added: "Settlement of the group action avoids the need for a lengthy, complex and expensive trial process, and achieves a financial result that is fair and right for all claimants."