Correction: A previous version of this article incorrectly stated that New York Attorney General Eric Schneiderman could indict Trump attorney Michael Cohen for breaking state laws regardless of whether Cohen was convicted of breaking federal versions of those same laws — and regardless of whether Trump pardoned him. The article has been updated with the correct information.

Michael Cohen, President Donald Trump’s personal lawyer, is potentially facing years in prison as federal agents look into payoffs to a pair of women who claim they had affairs with Trump before he won the White House.

The good news for Cohen is that Trump could pardon him for violating federal campaign finance or banking laws, a step that would keep him out of the crosshairs of New York state prosecutors as well. The bad news is that those same prosecutors could try to come after him for related crimes — and, if New York Attorney General Eric Schneiderman gets his way, the original crimes too.

Here’s why: New York has laws that closely mirror the federal ones Cohen stands accused of breaking. Under the state’s double jeopardy statutes, New York prosecutors couldn’t go after Cohen if Trump pardoned him for a specific federal crime. But they could go after him for related ones.

Take federal wire transfer and banking laws, which Cohen may have broken if he lied about the reason he got a loan to pay off one of the women and transferred her $130,000. That would also be illegal in New York, which outlaws both bank and wire fraud. New York prosecutors could go after Cohen for bank fraud even if Trump pardoned him after a conviction for federal wire fraud charges. The big difference would be that Cohen would have no White House protection.

Schneiderman hasn’t announced any kind of investigation into Cohen, but he has been coordinating closely with the Justice Department and special counsel Robert Mueller on their investigation into former Trump campaign chair Paul Manafort. Some commentators argued that the early charges against Manafort, which didn’t reference as many potential crimes as many had expected, were a sign that Mueller was leaving the door open for state prosecution and avoiding the double jeopardy issue.

But if he gets his way, Schneiderman may soon be able to go after Cohen even more directly.

In a letter to New York Gov. Andrew Cuomo and the Democratic and Republican leaders of the state House and Senate Wednesday, Schneiderman asked state lawmakers to pass legislation that would allow for prosecuting people on the state level for the exact crimes they were convicted of — and pardoned for — on the federal level.

That would mean modifying the state’s current double jeopardy provisions to ensure that someone like Cohen couldn’t evade state scrutiny after a federal pardon.

“Simply put,” Schneiderman wrote, under the current law “a defendant pardoned by the President for a serious Federal Crime could be freed from all accountability under federal and state criminal law.”

New York state Sen. Todd Kaminsky announced he’d be introducing a bill with a fix Thursday or Friday, though it’s unclear if, or when, it would make its way through New York’s fractious state government and be signed into law.

It’s not just Mueller: Cohen could also face a wide range of state charges

Although federal prosecutors haven’t revealed the specifics of their investigation into Cohen, the Washington Post reported that the major focus of the investigation is payoffs to women in exchange for their silence on claims of affairs with Trump.

One of the payoffs, to porn actress Stormy Daniels, came directly from Cohen, who claimed he used a personal loan to gather the $130,000 he gave her.

Federal investigators are reportedly looking at whether Cohen lied to banks in order to get the money. If he did, that would constitute federal bank and wire fraud. Jed Shugerman, a professor at Fordham Law, wrote that those crimes would fall under “scheme to defraud” under New York state law, which means Cohen could face state felony charges.

If the $130,000 payment was meant to help Trump win the election (something Cohen denies), it could count as a campaign contribution that was well in excess of federal limits. Beyond the possible federal crime, Cohen could also be charged with breaking New York state law if he made a false statement to a bank or to investigators about how he used the money.

Cohen also had a central role in contacts between Trump’s business and Russian officials, which could mean trouble if there was actual collusion between the Trump campaign and the Kremlin.

To take one example, Cohen was the Trump Organization’s point person for the Trump Tower Moscow project in 2015, even asking the Kremlin for help to get the project approved. That deal is why Mueller reportedly looked into Cohen. Mueller brought the details of what he’d found to Deputy Attorney General Rod Rosenstein, who decided that the federal prosecutor in New York should handle an investigation into Cohen.

If Cohen used any of the contacts he made with the Russian government to try to influence the election, he could face state election fraud charges. New York state law bans trying to get a candidate elected by “unlawful means,” and working with the Russians would likely fall under another section of the law that bans interfering with the “free exercise of the elective franchise.”

And if Cohen lied as part of any filings tied to his finances or his work with the Trump Organization, or as part of any of his dealings with investigators, he could face state obstruction of justice charges.

The key question is whether New York prosecutors could find ways of indicting Cohen for crimes different from the ones he was charged for on the federal level. That’s because a Trump pardon wouldn’t simply nullify any potential federal conviction — it would, under current New York law, bar state prosecutors from trying to go after him themselves.

If so, and if they won a conviction in a New York court, Cohen couldn’t look to the White House for salvation.

“None of these [state charges] would be subject to pardon by President Trump,” Cornell Law professor Jens David Ohlin told me.

Federal prosecutors are aware of the double jeopardy risk, and in the case of Paul Manafort, it appears that Mueller may have shaped his charges to leave state prosecutors space to go after him on their own.

Mueller may be giving state prosecutors a road map

When Mueller’s office filed charges against Manafort, they included a range of financial crimes. But the charges puzzled some experts because there were several obvious potential cases tied to those crimes that didn’t appear.

“There is a glaring omission in the indictment,” conservative commentator Andrew McCarthy wrote last year.

Although Mueller added new charges against Manafort in February, there’s still a range of tax and fraud charges that Mueller hasn’t used. That could be because he’s making sure that New York state prosecutors have ammunition in the event that Trump pardons Cohen after a federal conviction.

Mueller has been working with Schneiderman since August, and the decision about federal charges could well be a way for Mueller to ensure that targets of his investigation can’t get off with a pardon. Even if Trump fires Mueller, New York prosecutors could proceed with cases.

The pardon issue isn’t theoretical, as the New York Times reported last month that Trump’s former personal lawyer John Dowd discussed pardons with several people charged by Mueller, including Manafort.

Thus far, Trump hasn’t suggested that he’ll pardon Cohen, although he has repeatedly defended him in public as a “good man.”

As it currently stands, the president could decide to give his lawyer a get-out-of-jail-free card for any federal convictions, which would also shield him from being prosecuted for those same crimes on the state level.

Unfortunately for Cohen, New York prosecutors still have some tricks up their sleeves — and may soon get even more of them.