New York lawmakers gave final passage to legislation Wednesday that would allow President Trump's state tax returns to be released to congressional committees that have, so far, been barred from getting the president's federal filings.

The Democrat-led Senate and Assembly both approved the measures Wednesday, sending them to Gov. Andrew Cuomo, a Democrat. A spokesman has said the governor supports the principle behind the legislation but will review the bill carefully before deciding whether to sign it.

The legislation doesn't target Mr. Trump by name, but it would allow the leaders of the U.S. House Ways and Means Committee, the Senate Finance Committee or the Joint Committee on Taxation to access any New York state tax returns filed by elected officials and top appointed officials. The legislation would apply to personal income tax returns, as well as business taxes paid in New York.

Get Breaking News Delivered to Your Inbox

An earlier version of the proposal passed the state Senate two weeks ago that would have allowed congressional committees to get any New Yorker's returns, regardless of whether they held public office. Lawmakers later narrowed the legislation to address concerns that it went too far, prompting the Senate to hold a second vote on the new language Wednesday.

New York Republicans have railed against the bill. John Flanagan, who leads the Senate GOP, called the legislation "troubling" and "bad public policy."

Fellow GOP lawmakers said the new proposal's narrower focus shows Democrats went too far with their first proposal, which would have required state tax officials to hand over any New Yorker's state tax returns.

"This bill is nothing more than political showmanship, and we all know it," said Assembly Andrew Goodell, who represents a mostly rural western New York district.

Republicans also blasted Democrats for going after the president instead of focusing on challenges closer to home.

"The fact that we're talking about taxes in this house is ironic because we're not talking about the taxes that New Yorkers pay, which are the highest in the nation," said Rob Ortt, a senator from the Buffalo area.

But the proposals' Democratic sponsors — Sen. Hoylman, of Manhattan, and Assemblyman David Buchwald, of Westchester County — said the legislation promotes government transparency at a time when Americans need to know whether their elected leaders are putting the public's interest first.

"We are affirming Congress' role as a co-equal branch of government and the sacred constitutional principle that nobody is above the law, not even the highest elected official in the land," Hoylman said.

Hoylman told CBSN in April that the bill was a response to the administration's "stonewalling" of congressional requests to provide Mr. Trump's federal tax returns.

"Here you have a president who is stonewalling the U.S. Congress, a co-equal branch of government undertaking its important oversight responsibilities," Hoylman said. "Lo and behold, we have Donald Trump's tax returns here in the state of New York and we can provide them to Congress if the IRS, if the Treasury Department won't."

The proposed changes to state law were made amid the ongoing battle in Washington and in the courts over Mr. Trump's federal returns.

Treasury Secretary Steven Mnuchin has said he wouldn't comply with a congressional subpoena seeking six years of the president's tax returns, in part because the request "lacks a legitimate legislative purpose." U.S. Rep. Richard Neal, D-Mass., chairman of the House Ways and Means Committee, has threatened to go to court to get the administration to comply.

Democrats are seeking six years of Mr. Trump's personal and business tax returns to aid a committee investigation into whether the IRS is doing its job properly to audit a sitting president and whether the law governing such audits needs to be strengthened.

With New York being Mr. Trump's home state and headquarters of many of his business enterprises, the legislation could give Democrats access to the president's state tax returns at a time when the White House and Democrats who control the House continue to wrangle over the president's federal tax returns.

Much of the information on Mr. Trump's state returns would mirror the information included on a federal return, giving the Democrats a potential end run around the IRS if they wished to take it.

If Congress does request and obtain Mr. Trump's state tax returns, that doesn't mean the public gets to see them. Under federal law, the confidential information in the returns is supposed to be for the committee's eyes only.

The New York bills have no time limitation on the tax filings that could be shared with Congress. They require that the returns be requested "for a specified and legitimate legislative purpose," wording that could ostensibly give state officials the ability to refuse some requests they felt were primarily political in nature.

The New York bills would become law immediately upon being signed by Cuomo, though it could be delayed by a court challenge.

The Senate also passed a bill earlier in May which will allow state prosecutors to bring charges against individuals who receive presidential pardons, but only when the president has a conflict of interest in the case, such as pardoning relatives or former employees. Currently, state prosecutors cannot bring charges based on the same facts used to convict individuals of federal crimes for which they received pardons, creating a so-called "double-jeopardy loophole.

This bill could eventually apply to Mr. Trump's onetime campaign chairman Paul Manafort, a former New York resident who is serving time in prison on federal charges. Mr. Trump has said that he believed Manafort was treated poorly by prosecutors, and has hinted at issuing a pardon for his former campaign chairman.