Embattled Missouri Gov. Eric Greitens (R) signed a bill on Friday that would outlaw blackmailing a person with private sexual photos, the same crime he is accused of committing.

Greitens signed the new “revenge porn” bill into law, making it a state felony to disseminate nonconsensual, private sexual images, his office said in a news release.

The governor announced on Tuesday that he would resign from office rather than face impeachment charges over allegations that he tried to use revenge porn to cover up an extramarital affair.

ADVERTISEMENT

Greitens is accused of taking nonconsensual photos of a woman during a sexual encounter and threatening to blackmail her with them.

He has admitted to having an affair, but has consistently denied doing anything illegal.

Greitens cannot be charged under the new law because it was not in effect at the time of the alleged crime, The Associated Press reported.

Prosecutors dropped their felony invasion of privacy case against Greitens last month after his legal team signaled that they would call St. Louis circuit attorney Kim Gardner as a witness. Gardner had announced the charges against him.

Instead, prosecutors will ask a court to appoint a special prosecutor who would then refile the case.

The revenge porn bill was one of 77 bills that Greitens signed into law on his last day of office, according to his office.

“The conservative reform agenda is working in Missouri, and I’m proud of what we’ve delivered,” he said in the release.

Greitens also issued five pardons and commuted four sentences.

The NAACP previously had called on Greitens to commute the death penalty sentence of Marcellus Williams, an African-American man who was convicted of murder in 2001. But Williams's sentence was not commuted. CNN reported in 2017 that DNA evidence from the murder weapons was later discovered to belong to a different man.

Greitens will be replaced by Republican Lt. Gov. Michael Parson who will serve his remaining term through January 2021, AP reported.