Volkswagen has agreed to take a series of steps costing about 10.2 billion US dollars (£6.89 billion) to settle claims from its unprecedented diesel emissions cheating scandal in the US, sources say.

Most of the money would go to compensate 482,000 owners of cars with two-litre diesel engines that were programmed to turn on emissions controls during lab tests and turn them off while on the road, two people briefed on the matter said.

One of the people said the agreement was tentative and could change by the time the terms are officially announced by the judge on Tuesday.

The bulk of the cash would be used to fix the cars, buy them back and compensate owners. Some funds would go to government agencies as penalties and for a programme to remediate the environmental damage caused by pollution, the person said.

Owners would have a choice between selling their vehicles back to VW at the value before the scandal broke on September 18 2015, or keeping the cars and letting the company repair them for free. Either way, they would also get 1,000 US dollars (£675) to 7,000 US dollars (£4,729) depending on their cars' age, with an average payment of about 5,000 US dollars (£3,378), one of the people said.

Attorneys representing owners, VW and government agencies including the Environmental Protection Agency (EPA) have not yet agreed on the steps VW will take to repair the cars, the person said.

Any fix likely would require a bigger catalytic converter or injection of the chemical urea into the exhaust to help neutralize the pollution.

The 10.2 billion US dollars eclipses costs of all recent automotive scandals. General Motors, for instance, paid roughly 6.9 billion US dollars (£4.6 billion) for its giant recall of defective ignition switches two years ago. But unlike other scandals, VW has admitted to deliberately deceiving government regulators.

The EPA has said the cars, which include many of VW's most popular models, can give off more than 40 times the legal limit of nitrogen oxide, which can cause respiratory problems in humans. Around 11 million cars worldwide also had the cheating software, but nitrogen oxide emissions standards are not as stringent outside the US.

Neither VW spokeswoman Jeannine Ginivan nor EPA spokesman Nick Conger would comment on the settlement.

VW may have to pay additional penalties to government agencies, one of the people said. The Justice Department has sued VW on the EPA's behalf, and the carmaker could also be penalised by the California Air Resources Board and the Federal Trade Commission, which has sued over false advertising claims.

Volkswagen owners filed dozens of lawsuits against VW after it acknowledged in September that it intentionally defeated emissions tests and put dirty vehicles on the road.

The company faces as much as 20 billion US dollars (£13.5 billion) in fines for Clean Air Act violations alone, on top of paying to fix the cars or compensate their owners.

The settlement does not include three-litre Volkswagen diesels, which had another version of cheating software.

Full details of the settlement are scheduled to be released by Senior US District Court Judge Charles Breyer in San Francisco.