The U.S. Securities and Exchange Commission has defended the pace of its investigation into Volkswagen over its use of diesel emissions cheating devices.

In March, the SEC charged VW, two of its subsidiaries, and former chief executive Martin Winterkorn with fraud. These charges came approximately three and a half years after news about VW cheating emissions testing became public.

Reuters reports that in May, U.S. District Judge Charles Breyer questioned why it took the SEC so long to sue Volkswagen. He said he was “totally mystified” as to why it took the SEC more than two years to file a lawsuit against the car manufacturer after it settled with the U.S. Justice Department’s criminal probe and agreed to pay $4.3 billion in penalties and plead guilty to three felonies.

Also Read: SEC Charges VW And Former CEO Martin Winterkorn With Fraud

In a court filing on Monday, the SEC said it had spent time holding settlement talks with VW before deciding to file suit. Another issue was that they had received approximately 2 million pages of records from VW and delayed issuing formal subpoenas after the car manufacturer agreed to voluntary produce materials.

“[SEC] staff worked hard and as quickly as possible under very difficult circumstances to complete an investigation into numerous different securities offerings conducted by a foreign company and three of its affiliates over many years,” the commission stated, adding that it “treated VW fairly and afforded the company full process throughout its investigation.”

The SEC added that its investigation had been delayed because it took VW a long time to produce required documents and that it had to deal with “uncooperative witnesses who were reluctant or altogether refused to speak to the staff.”

It also claims that VW made false and misleading statements to investors and underwriters about vehicle quality, environmental compliance and its own financial standing and that by concealing the emissions scheme, the company benefited from hundreds of millions of dollars while issuing securities at more attractive rates.