A US federal district court judge Tuesday gave preliminary approval to a multi-billion-dollar offer from Volkswagen to settle some of its legal woes in the wake of its diesel emissions cheating affair, dpa reported. Judge Charles Breyer called the 14.7-billion-dollar settlement deal fair and reasonable after hearing US authorities, plaintiffs and Volkswagen make their cases in a two-hour hearing in San Francisco. Under the deal, which VW agreed to last month, the German carmaker would spend up to 10 billion dollars buying back or repairing about 475,000 2-litre diesel cars from Volkswagen and Audi equipped with software that manipulated vehicle emissions during official testing. VW has also agreed to compensate owners between 5,100 and 10,000 dollars each. In addition, the carmaker will spend 2.7 billion dollars to support environmental projects, with an additional 2 billion dollars earmarked for research on reducing emissions. The agreement would bring to an end hundreds of civil lawsuits filed against Volkswagen by US consumers, who can now choose to accept the offer or opt out and pursue litigation on their own. The settlement must be approved by Breyer, who has been overseeing the civil suits, before it can come into force. A final hearing has been set for October 18. But some loose ends remain. A plan to repair the cars to meet US emissions standards has yet to be finalized. Another 85,000 cars with 3-litre diesel engines are not covered by the settlement. Questions about how to handle them will be addressed in a court hearing August 25.