The New York State Senate passed a bill Wednesday that would make it easier for Congress to obtain President Donald Trump's state tax returns, a measure that Gov. Andrew Cuomo has said he will sign if it reaches his desk.

The bill, called the TRUST Act, passed by a 39-to-21 vote. It would amend state law to permit the commissioner of the state Department of Taxation and Finance to release any state tax return requested by the leaders of the House Ways and Means Committee, the Senate Finance Committee or the Joint Committee on Taxation for any "specific and legitimate legislative purpose." Existing laws generally prohibit such a release.

Those congressional committees could file a request with the state only after efforts to gain access to federal tax filings through the U.S. Treasury Department failed.

The bill would apply only to Trump's state returns and not the federal ones currently at the center of a battle between the House and the Treasury Department. But those state returns would provide a trove of information, because New York serves as the headquarters of the president's business, and is his home state. They are likely to contain much of the same information congressional lawmakers are seeking from his federal returns.

Democratic state Sen. Brad Hoylman, who sponsored the legislation, told NBC News he was "very hopeful" it would be signed into law and said he discussed his bill personally with Cuomo. Though he declined to describe those discussions, he said he believes Cuomo "understands the importance" of the legislation.

"Given the current events, the impetus is even stronger to get Trump's taxes to the Ways and Means Committee," said Hoylman, who represents a Manhattan district. "This is a constitutional showdown that we see evolving before our eyes."

In a statement released with the bill's passage, Hoylman said Trump "has broken 40 years of political tradition by not releasing his tax returns" and that his administration is now "precipitating a constitutional crisis by shielding the president from congressional oversight over those returns."

"Our system of checks and balances is failing," he continued. "New York has a special role and responsibility to step into the breach."

House Judiciary Committee Chairman Jerrold Nadler, D-N.Y., said in a statement that the bill "is a workaround to a White House that continues to obstruct and stonewall the legitimate oversight work of Congress."

"The state return should generally match the federal return, and obtaining it from New York State will enable us in Congress to perform our oversight function and maintain the rule of law," he added.

Speaking from the Senate floor on Wednesday, Republican state Sen. Frederick Akshar said "everyday taxpayers are not amused" by the legislative efforts.

"If you want to push back on the president, if you want to raise hell with the president, go ahead," he said. "Run for a House seat. Run for the United States Senate."

Both the state Senate and state Assembly, where the bill was advanced, too, are under Democratic control, as is the governor's mansion. Last month, in an interview with the public radio station WAMC, Cuomo said he supported the bill so long as it applies to any official elected in the state.

But Ed Cox, chairman of the New York Republican Party, told NBC News last month that the bill was clearly aimed at the president himself "with the purpose of re-litigating the 2016 campaign in which the people of the United States knew that he had not released his tax returns and they still elected him president of the United States."

The advancement of the bill comes as Treasury Secretary Steven Mnuchin on Monday rejected House Democrats’ request for Trump's federal returns, again missing a congressional deadline to turn over the documents. House Democrats are now faced with pursuing a legal battle with the Treasury Department to obtain the tax information.

Federal law gives three Congressional tax committees the unqualified right to obtain and review the otherwise confidential federal tax information of any taxpayer from the Treasury Department.

The White House did not immediately respond to a request for comment from NBC News.

Additionally, the state Senate passed a bill on Wednesday that would allow state prosecutors to pursue charges against individuals pardoned by the president. New York Attorney General Letitia James and Cuomo both endorsed that legislative push.

The bill would create an exception to New York law, which prohibits the state from prosecuting a person who has already been tried for the same crime by the federal government. The exception would make it easier for prosecutors to pursue a case against someone who received a presidential pardon.

"The legislation upholds the standards of fairness & justice at the core of the double jeopardy law, and prevents it from being used as a tool to deny justice altogether," James tweeted. She added, "The bill embodies a central component to the foundation of our democracy: The President — unlike a monarch or authoritarian dictator — is not above the law and our laws should apply to all people of this nation equally, including and especially our leaders."

The state Assembly has not yet scheduled dates for votes on either that bill or the tax legislation.