New York state lawmakers passed a measure Tuesday that would allow prosecutors to pursue state charges against certain individuals even if they have received a presidential pardon, a move seen as a direct shot at President Donald Trump.

New York's state Assembly passed the measure — which creates a narrow exception in the state's double-jeopardy law — by a 90-52 vote. New York law currently prohibits the state from prosecuting a person who has already been tried for the same crime by the federal government. The bill would make it easier for prosecutors in certain circumstances to pursue a case against someone who has received a presidential pardon for the federal conviction.

The exception would allow state prosecutors to open or advance investigations into any pardoned individual who served in a president's administration, worked directly or indirectly to advance their campaign or transition, or worked at a non-profit or business controlled by the president and whose alleged criminal activity took place in New York state. The exception also allows for investigations to be opened or continued into anyone who was pardoned for the president's benefit.

Notably, Trump's business and campaign are both headquartered in New York.

The change was backed by New York Attorney General Letitia James, who is investigating Trump and his family members, and Democratic Gov. Andrew Cuomo, who has indicated he will sign the bill. Prosecutors and lawmakers who back the bill said the measure is necessary to ensure that investigations into the president, his associates and his business taking place at the state level are not derailed by pardons.

James, who led the charge to get the double-jeopardy law changed, tweeted soon after the bill's passage that double jeopardy "exists to prevent someone from being charged twice for the same crime, not to allow them to evade justice altogether."

"The rule of law is a core pillar of our nation's democracy and my primary role is to uphold it and ensure that no one is above it," she added.

James has multiple Trump-related investigations open at the moment, including the probe into the Trump Foundation that led to the dissolution of the president's charity and an investigation that involved James subpoenaing Duetsche Bank and Investors Bank for information on a set of major Trump Organization projects and Trump's effort to purchase the NFL's Buffalo Bills in 2014.

"We will use every area of the law to investigate President Trump and his business transactions and that of his family as well," James told NBC News in a December interview.

Special counsel Robert Mueller, in his 400-plus page report on Russian interference in the 2016 presidential election, mentions presidential pardons 64 times, The Washington Post found. Mueller's report scrutinizes Trump's comments about possibly pardoning former campaign chairman Paul Manafort, ex-longtime attorney Michael Cohen, and former national security adviser Michael Flynn.

Joseph Lentol, the Democratic assemblyman sponsoring the legislation, said the bill "will confront any president, not just this one," who believes they "can wash away illegal behavior."

Ahead of the vote, Republican Assemblyman Andy Goodell questioned the constitutionality of the legislation.

"Today we're being asked to overturn nearly 100 years of New York state history where we as a state have recognized the fundamental unfairness of double jeopardy," Goodell said, adding that lawmakers were being asked to set aside the "concept of fairness and equity not because we're faced with any actual situation but on a hypothetical situation."

Both the state Senate and state Assembly are under Democratic control. Since the bill already passed the state Senate earlier this month, it is now headed to Cuomo's desk for his approval.

Democratic state Sen. Todd Kaminsky, the state senator who sponsored the bill and former federal prosecutor, said in a statement after the bill passed the Assembly Tuesday that the legislative effort was "crucial" to defend the justice system.

"With the President all but pledging to corruptly abuse his pardon power to allow friends and associates off the hook, it is crucial for us to close the double jeopardy loophole and preserve the rule of law in New York," Kaminsky said.