Image copyright Getty Images Image caption US Attorney-General Loretta Lynch said VW denied and then lied in a bid to cover up its actions

"Volkswagen obfuscated, they denied, and they ultimately lied."

These were the words of the US Attorney General Loretta Lynch, as she set out how the German carmaker would be punished for attempting to hoodwink the US authorities over the emissions produced by its diesel cars.

It has been a tough week for Volkswagen.

It has been fined $4.3bn, agreed to plead guilty to criminal charges - and six executives are facing charges. One of them, Oliver Schmidt, has spent the past few days in a Miami jail. Others may yet find themselves in the firing line.

But because of this, we now have a very clear idea not only of what Volkswagen was doing wrong, and how it went about it, but also the measures that were taken to conceal that wrongdoing.

As part of its plea bargain with the US authorities Volkswagen signed up to an agreed "Statement of Facts". It draws heavily on the results of an investigation by the law firm Jones Day, commissioned by VW itself.

The FBI makes further detailed allegations in its criminal complaint against Oliver Schmidt. These have not yet been tested or admitted.

'Defeat device'

According to these documents, the seeds of the scandal were sown in 2006, when VW were designing a new diesel engine for the US market.

Supervisors in the engine department realised they had a problem. They could not design an engine that would meet tough emissions standards due to enter into force in 2007, and at the same time give customers the performance that they wanted.

Their solution was to ask their engineers to design engine management software which would turn on emissions controls when the car was being tested, and turn them off when it was being driven on the road.

Image copyright Getty Images

This 'defeat device' software was able to recognise the standard testing procedure. It was based on a program developed by VW's subsidiary Audi, which engineers had specifically stated should "absolutely not be used" in the US.

Not everyone was happy about this, it seems. Engineers "raised objections to the propriety of the defeat device" in late 2006.

In response, a manager decided that production should continue, still using the device. He also "instructed those in attendance, in sum and substance, not to get caught".

A similar row broke out the following year, and again, the decision was taken to press on regardless.

Subsequently, the use of the defeat device appears to have become routine.

'Concealment'

The Statement of Facts describes how the software was refined and improved over time.

A spate of breakdowns was blamed on the cars remaining in 'test' mode while being driven on the road. Supervisors worked with engineers to solve the problem, and "encouraged the further concealment of the software".

The engineers were also told to destroy documents relating to the issue.

The deception came to a head when, in 2014, the California Air Resources Board approached the company to find out why tests had shown that its cars were emitting up to 40 times the permissible amount of nitrogen oxides when driven on the road.

Image copyright EPA

VW supervisors "determined not to disclose to US regulators that the tested vehicle models operated with a defeat device". Instead they "decided to pursue a strategy of concealing the defeat device… while appearing to cooperate".

'Co-operative witnesses'

The FBI claims in its criminal complaint against Mr Schmidt - who was a head of compliance at VW's US division from 2012 to 2015 - that the deception eventually went to the very top of the company.

Citing "co-operative witnesses" and allegedly corroborating documentation, it claims that the company's executive management in Wolfsburg were briefed on the issue in July 2015. Rather than tell its staff to come clean about the defeat device, it says, "VW executive management authorized its continued concealment".

There is, however, no mention of this meeting in the statement agreed by Volkswagen.

Ultimately, Volkswagen's wrongdoing was confirmed to the authorities by a single employee acting "in direct contravention of instructions from supervisors at VW". But the deception did not end there.

The Statement of Facts explains how VW staff were warned by an in-house lawyer that the authorities were about to circulate a so-called "hold notice", obliging them to retain and preserve documents under their control.

Engineers were told to "check their documents", which several of those present "understood to mean that they should delete their documents".

The message was repeated at a number of subsequent meetings, one of them attended by 30-40 people and ultimately thousands of documents were deleted.

Tough line

When the scandal at Volkswagen first came to light, the company's former US chief executive, Michael Horn blamed "a couple of software engineers". It is now clear that many more people were involved, at least some of them in positions of authority, and deliberate attempts were made to cover up wrongdoing.

It is not hard, then, to see why the US authorities have taken such a tough line with the company. But some questions remain unanswered.

We still don't know for certain, for example, whether people at board level knew what was going on.

It's also unclear why the same software that was fitted illegally to 600,000 US vehicles was also present on millions of others sold around the world, including eight million in Europe.

VW continues to maintain that the systems didn't actually break European law - though it is in the process of repairing those vehicles all the same.