ALBANY — The tax filings of President Trump and all public elected officials in New York will be fair game for congressional Democrats under a new law.

The state Legislature on Wednesday approved a bill that allows the state Department of Taxation and Finance to release tax returns of thousands of New Yorkers upon an official request by Congress.

Gov. Andrew Cuomo previously said he would support the idea.

“This bill stands for a principle of transparency in regards to top officials’ tax returns and recognizing that shedding light on conflicts, potential conflicts of interest is for a public purpose and also stands for working collegially with our colleagues in the federal legislature so they are able to effectuate their power,” Assembly sponsor David Buchwald (D-Westchester) told reporters after the vote.

Changes were made to the scope of the measure, which originally included all private citizens.

“The class of people are the elected officials in the state of New York, top appointees and the entities that they control or are a significant shareholder of, so we’re talking in the thousands, but not the [millions] that the original legislation would’ve applied to,” Buchwald added.

The newest iteration of the bill passed the Assembly 85-49, and 31-21 in the state Senate.

An official request from the House Ways and Means Committee, the Senate Finance Committee and the Joint Committee on Taxation must be made in order to obtain Trump’s state tax return.

But Republicans argue Democrats were merely targeting Trump and losing sight of New York issues, like high taxes and crumbling infrastructure.

“What’s really at work here, as we all know, is politics and the desire to bring down this president and an attempt to weaponize the state legislature in an effort to do that. It’s wrong, we know it’s wrong but, this is politics,” argued Assemblyman Michael Fitzpatrick (R-Smithtown) during the floor vote.

“This is a president who I think is doing an outstanding job on a number of issues, but the other side will not cease in their effort to bring him down.”

It’s a piggyback effort spurred by US Rep. Richard Neal (D-Mass.), the House Ways and Means chairman, who is fighting to obtain Trump’s federal tax returns.

His most recent request was rebuffed by Treasury Secretary Steven Mnuchin.

Neal has previously said he’s not interested in New York’s bill, and Buchwald told reporters he has not spoken to the congressman after he updated his legislation.