Volkswagen will pay a $2.8 billion fine as a part of a plea deal with the Justice Department for the emissions scandal that rocked the company in 2015.

A federal judge agreed with the plea deal that was first reached in January, according to multiple reports. The deal will also call for VW to pay $1.5 billion as a civil settlement with aggrieved owners.

The company had to admit to wrongdoing as a part of the deal.

The company installed defeat device software in 600,000 "clean diesel" vehicles that allowed the vehicles to pass emissions tests but then switched to a normal mode after testing that allowed the cars to spew about 40 times the legal limit of nitrogen into the atmosphere, violating the Clean Air Act.

Evidence uncovered shows the company's top executives knew about the defeat devices and covered them up for years in order to sell the vehicles in the U.S.

Nitrogen pollution can cause smog and release fine particulate matter into the air. Those pollutants are linked to asthma and other respiratory illnesses that can cause premature death. Children, the elderly and people with pre-existing conditions see increased risk for harm when they are exposed to the pollutants, the EPA says.

The scandal forced top company officials to resign and led to a drop in sales for the German automaker.