WASHINGTON (Reuters) - The U.S. Securities and Exchange Commission (SEC) on Monday defended the pace of its investigation into Volkswagen AG VOWG_p.DE after a judge asked why the agency waited two years after a global scandal related to vehicle emissions to sue the automaker.

FILE PHOTO: The logo of Volkswagen is seen in front of its plant, in Bratislava, Slovakia, July 4, 2019. REUTERS/Radovan Stoklasa/File Photo

The SEC filed a civil suit in March accusing Volkswagen and its former chief executive, Martin Winterkorn, of defrauding investors in U.S. bond offerings.

Volkswagen was caught using illegal software to cheat U.S. pollution tests in 2015, triggering a global backlash against diesel vehicles that has so far cost it 30 billion euros ($33.65 billion) in fines, penalties and buyback costs. In May, it set aside an additional 5.5 billion euros in contingent liabilities.

U.S. District Judge Charles Breyer in May questioned the SEC’s “lateness” in suing VW more than two years after the German automaker settled the U.S. Justice Department’s criminal probe, pleading guilty to three felonies and paying $4.3 billion in penalties.

“My basic question is what took you so long,” Breyer said, adding he was “totally mystified” as to why the SEC waited until 2019.

On Monday, the SEC disclosed details of its probe in court filings and said it held extensive settlement talks with the automaker before deciding to file suit.

The SEC said it received about 2 million pages of records from VW and delayed immediately issuing formal subpoenas after VW agreed to voluntarily produce materials.

In its court filing on Monday, the SEC said that its “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,” and “treated VW fairly and afforded the company full process throughout its investigation.”

The agency added that its challenges “included long delays by VW in producing documents and other information,” and “uncooperative witnesses who were reluctant or altogether refused to speak to the staff.”

VW said Monday in a statement that it had “cooperated fully with the SEC’s investigation, and today’s filing confirms that the SEC is now piling on.”

The company settled with the Justice Department in January 2017 over the issue of asset-backed securities and “obtained a broad release, including from fraud and misrepresentation claims,” it added.

VW noted that the filing said SEC staff did not begin to investigate VW bond sales until 2017 “even though private bondholders had sued Volkswagen over those bonds in June 2016. Volkswagen has never missed an interest or principal payment for any of its bonds, which always remained investment grade.”

SEC offices in New York and Chicago opened inquiries in September 2015, wrote Jeffrey Shank, an SEC attorney who supervised the probe, in a court filing, adding the agency was unaware of the existence of the VW bonds until 2017 and that it then took 10 months for VW to disclose who was responsible for statements made to VW bond investors.

The SEC said former Volkswagen of America CEO Michael Horn refused to be interviewed by the SEC even after it told his lawyers in September 2017 the U.S. Justice Department would be willing to offer Horn safe passage.

The SEC also was unable to interview Winterkorn.

Shank said the SEC held settlement talks over several months and gave VW and Winterkorn’s lawyers an opportunity to argue why the SEC should not file suit.

Regulators and investors argue VW should have informed them sooner about the scope of the scandal, while the automaker says it was not clear it would face billions of dollars in fines and penalties.

VW issued more than $13 billion in bonds and asset-backed securities in U.S. markets at a time when senior executives knew that more than 500,000 U.S. diesel vehicles grossly exceeded legal vehicle emissions limits, the SEC complaint said.

Volkswagen reaped hundreds of millions of dollars “by issuing the securities at more attractive rates for the company,” the SEC said.