The New York state Assembly passed legislation Wednesday to give Congress access to President Donald Trump's state tax returns.

Democratic Gov. Andrew Cuomo is expected to sign the bill, which passed the state Senate earlier this month.

The legislation, which passed 84 to 53, would amend New York law to permit the commissioner of the state Department of Taxation and Finance to release the state tax returns of those in federal, state and local elected or higher-level public offices, along with entities those people control or have a large stake in, that are requested by the leaders of congressional tax-writing committees.

Existing laws generally prohibit such a release, and those congressional panels — the House Ways and Means Committee, the Senate Finance Committee and the Joint Committee on Taxation — could file a request with the state only after efforts to gain access to federal tax filings through the Treasury Department failed.

"Secrecy in government breeds corruption," Thomas Abinanti, a Democratic assemblyman, said as the legislation was being debated, adding that Trump has "intentionally and publicly thwarted the legitimate and necessary oversight of Congress."

"Congress must guarantee that no government official is selling government policy for personal gain," he said.

Opponents criticized the legislation as "political," with one Republican assemblyman, Doug Smith, saying lawmakers were "using this body as a weapon against" Trump.

Michael Benedetto, a Democratic lawmaker, expressed concern with both this legislation and a bill that passed Tuesday that would weaken presidential pardon power.

"When I see a couple of bills coming to us where the purpose is obvious, political in nature, then it gives me pause," Benedetto said. "We are traveling down a path that we should not be traveling down. No legislature should craft legislation for political reasons just to get a few people they consider their enemies."

Over the weekend, members of the Assembly made several key changes to the legislation originally passed by the state Senate. The bill had allowed for "any" state tax return Congress requested to be provided, language that critics said was too broad and should make any taxpayer in New York state nervous.

The new version of the legislation also changed the purpose for which the returns can be obtained, swapping out "specified and legitimate legislative purpose" for any "legitimate task" of the Congress. Additionally, the bill would now require that New York state redact any federal tax information that might appear alongside state returns.

Those changes to the legislation were passed separately Wednesday in an 85-49 vote and are expected to be approved quickly by the state Senate.

"While I don't necessarily think that the amendments were required to get the bill passed, this and other (changes) made the bill stronger and better, and that's what the legislative process is all about," David Buchwald, the Democratic assemblyman sponsoring the legislation, told NBC News earlier this week. Buchwald noted that Cuomo's office was "involved in discussions" on the legislation.

State Sen. Brad Hoylman, a Democrat who sponsored the legislation, responded to criticism that the bill is political, telling NBC News it's "a maneuver in support of the constitutional principle that no one is above the law."

The bill would apply only to Trump's state returns, not the federal returns currently at the center of a battle between House Democrats and the Treasury Department. The state filings would still provide a trove of information, however, because New York is Trump's home state and the headquarters of his business. The state returns are likely to contain much of the same information members of Congress are seeking from Trump's federal filings.

Both the state Senate and Assembly are under Democratic control.

Last week, the Treasury Department said it would not comply with congressional subpoenas to provide six years of Trump’s tax returns to the House Ways and Means Committee — making it ever more likely that Democrats will take the fight over Trump's returns to court.

On Tuesday, The Washington Post reported that a draft IRS memo it obtained said the Treasury Department must turn over tax returns to Congress unless the president asserts executive privilege. Federal law gives the three congressional tax committees the right to obtain and review the otherwise confidential federal tax information of any taxpayer from the Treasury.

The Treasury Department has denied repeated requests from the House Ways and Means Committee to turn over Trump's tax returns. The president has refused to make his returns public, the first president in four decades to do so. Trump has cited ongoing audits as preventing him from releasing his tax filings, although such a review does not preclude him from releasing the information.