Drew Peterson has been sentenced to another 40 years in prison after being convicted of a murder-for-hire scheme that involved trying to have the prosecutor who first put him in jail killed.

A judge ruled Friday that Peterson will serve the additional time after he finishes his 38-year sentence for the killing of his third wife Kathleen Savio. He also was sentenced to three years of supervision.

Peterson called the conviction "a scam."

"Everything you've heard on these tapes was fake. It was fabricated," he said in court before the sentencing, adding that there were more than a dozen witnesses that "could have shown my innocence."

He ended his statement by turning to Will County State’s Attorney James Glasgow, who he tried to have killed, and saying, "Jim Glasgow, I did not contract to have you killed."

After the sentencing, Peterson picked up his papers, his hands shaking, and left the courtroom led by Department of Corrections officers.

A jury found Peterson guilty two months ago of hatching a plot from Menard Correctional Center to have Glasgow killed. The downstate jury took barely an hour to convict the former Bolingbrook police sergeant after prosecutors said he offered $10,000 to a Satan’s Disciple known as “Beast” to have Glasgow killed. The fellow inmate wore an FBI wire and caught Peterson on tape.

"[My family was] under a cloud and that cloud has been lifted," Glasgow said outside the courtroom. "It should have never been there in the first place."

Peterson, 62, faced a minimum 20-year sentence in the murder-for-hire case. Randolph County State’s Attorney Jeremy Walker has said he would seek a sentence near the maximum of 60 years.

"This is the type of case that screams a lengthy sentence," said Walker.

Glasgow led the team of prosecutors that secured Peterson’s murder conviction. Peterson has been locked up at Menard Correctional Center since 2013, where he enlisted street-gang member Antonio Smith, an inmate serving 40 years for crimes that include attempted murder, to help pull off Glasgow’s assassination.

Walker said Peterson was driven to have Glasgow killed for four reasons: Peterson wanted to protect his pension; he wanted to win his appeal; he didn’t want to be charged with the murder of Stacy Peterson; and he was mad that his son lost his job at the Oak Brook police department.

Peterson’s fourth wife, Stacy, vanished in 2007, and that set in motion the events that led to his 2012 conviction for Savio’s murder.

No one has ever been charged in connection with Stacy Peterson’s disappearance. However, Peterson remains the prime suspect, and Glasgow told reporters in May “we never stop reviewing that case.”

In court Friday, Glasgow detailed a series of unsettling events, including one where his son feared that the sound of a firepit breaking in their backyard was a gunshot from a potential hitman.

"One of my sons was outside with the dogs and he came charging in the house and he had a look of terror on his face and he said, 'I just heard a gunshot,'" Glasgow said.

He also mentioned other incidents where the family feared cars were following them "unusually."

Meanwhile, a source familiar with the matter said Peterson has been complaining to the judge about his Randolph County defense lawyer — after famously blaming his former lead counsel in 2012 for his murder conviction.

The judge Friday denied a motion for Peterson to get a new attorney, and also denied a motion for a new trial.

"He's not going to get out," said Savio's sister Sue Doman. "He's never going tog et out again and it's a good thing because now people will be safe from Drew Peterson because he is a murderer."