DETROIT — Volkswagen deleted documents and obstructed justice after the U.S. Environmental Protection Agency accused the company of cheating on emissions tests, a former employee alleged in a lawsuit.

Daniel Donovan says in a whistle-blower case that he was wrongfully fired Dec. 6, 2015 after refusing to participate in the deletions and reporting them to a supervisor. The lawsuit says that the evidence deletion continued for three days after the Sept. 18 allegations from the EPA and despite a hold order from the Justice Department.

VW has admitted that it programmed about 600,000 diesel-powered cars in the U.S. to turn on pollution controls during EPA treadmill tests and turn them off when the cars were on the road. The agency alleges that the cars emit as much as 40 times the allowable amount of nitrogen oxide, which can cause respiratory problems.

The Justice Department is investigating potential criminal charges against VW, and the company has been negotiating with the EPA and California regulators to come up with repairs. VW faces a March 24 deadline from a federal judge to reach agreement on the fixes.

Donovan worked as a technology employee with VW”s general counsel office who was responsible for electronic information management in injury and product liability cases. The lawsuit said he was fired “because of his refusal to participate in a course of action that would spoliate evidence and obstruct justice” in the EPA and Justice Department probes.

But VW said Monday that Donovan”s departure from the company was not related to the diesel emissions issue. “We believe his claim of wrongful termination is without merit,” the company said Monday in a statement.

Donovan, who worked in VW”s Michigan offices, alleges that the company”s information technology department did not stop deleting items until Sept. 21, so Donovan reported his concerns to his supervisor, according to the March 8 lawsuit filed with the Oakland County Circuit Court in Pontiac, Michigan.

It also says the department was not preserving backup disks.

Donovan was fired because VW of America believed he was about to report the deletions and obstruction of justice to the EPA, Justice Department or the FBI, according to the complaint. It was unclear whether Donovan, of suburban Detroit, spoke with federal investigators. His attorney, Sam Morgan, would not comment and said his client didn”t want to speak about it either. A message was left for the U.S. attorney”s office in Detroit.

The lawsuit alleges that the company violated the Michigan Whistleblowers” protection act.

Obstruction of justice by destroying evidence can have serious consequences for companies, but also can be difficult to prosecute. In 2002, accounting firm Arthur Andersen was found guilty of shredding documents involving its auditing of defunct energy firm Enron Corp. in order to thwart a federal accounting probe. The firm, which withered after the Enron case, was placed on five years of probation and fined $500,000. But its conviction was overturned by the Supreme Court in 2005, which ruled the judge”s instructions to the jury were too vague for jurors to determine correctly whether Andersen obstructed justice.

VW already faces the potential for over $20 billion in fines from the government for the pollution violations, as well as hundreds of class-action lawsuits from angry vehicle owners. Before the scandal, diesels accounted for about 25 percent of the company”s U.S. sales.

The scandal already has cost Volkswagen”s CEO his job, and last week, VW ousted its top U.S. executive.