James Liang, a California-based engineer who was Volkswagen’s Leader of Diesel Competence during the time when the company installed emissions control-cheating software on millions of vehicles, was sentenced to 40 months in prison and two years of supervised release on Friday. Liang, 63, pleaded guilty last September to defrauding the US, committing wire fraud, and violating the Clean Air Act.

In his guilty plea, Liang attested that Volkswagen gave him and his colleagues a mandate to build a new diesel engine for sale in the US. When the engineers realized they couldn’t build the engine to meet the US’ emissions standards, Liang and his colleagues designed software to help the car recognize when it was being tested for emission compliance and turn on the control system that would otherwise be off during normal driving. “VW tasked Liang with making the defeat device work by calibrating it to recognize specific US emissions tests’ drive cycles,” the Justice Department (DOJ) wrote in a press release.

Liang also said he personally attended meetings with the Environmental Protection Agency (EPA) and the California Air Resources Board (CARB) and deceived those regulators by omitting the fact that the new VW diesel models were in not compliance with emissions standards. Additionally, he “admitted that he helped his co-conspirators continue to lie to the EPA, CARB, and VW customers even after the regulatory agencies started raising questions about the vehicles’ on-road performance,” the DOJ said.

According to Reuters, Liang could have been sentenced to up to five years in prison. The engineer's lawyers asked that he be placed under home detention and serve time doing community service.

Liang was the first Volkswagen employee to be charged with a crime and to enter a plea. The Department of Justice, the Federal Trade Commission, and many states have lodged complaints against the German automaker itself since the scandal broke in 2015, but it wasn’t until early this year that six more executives from the upper echelons of VW Group management were indicted. Of those six, only Oliver Schmidt, a former emissions compliance expert for Volkswagen, has been arrested. Schmidt pleaded guilty earlier this month.