New York Gov. Andrew Cuomo on Monday signed a bill that would allow certain members of Congress to access President Donald Trump's New York state tax returns.

The bill, which Cuomo had been expected to OK, requires New York officials to release tax returns of public officials that have been requested by "congressional tax-related committees" who cite a "legitimate task" of Congress in seeking them.

"This bill gives Congress the ability to fulfill its Constitutional responsibilities, strengthen our democratic system and ensure that no one is above the law," Cuomo, a Democrat, said in a statement. "Tax secrecy is paramount — the exception being for bona fide investigative and law enforcement purposes."

One of Trump's personal lawyers, Jay Sekulow, called the bill "more presidential harassment" on Monday afternoon

"We will respond to this as appropriate," he added.

The tax bill, which was passed weeks ago by the Democratically controlled state Legislature, makes it easier for New York to turn over the state tax returns of certain public office-holders, along with entities those people control or have a large stake in, that are requested by the leaders of the three congressional tax-writing committees.

"It's a momentous day for transparency in government, especially when it comes to holding elected officials more accountable," David Buchwald, a state Assemblyman who sponsored the legislation, told NBC News.

The laws in place prior to Cuomo's signing of the bill generally bar the release of tax returns, and the 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 had failed.

"It underscores the principle of our democracy that nobody, not even the president of the United States, is above the law," state Sen. Brad Hoylman, another sponsor of the legislation, said.

"I also believe that New York has a unique role and responsibility in this constitutional showdown between Congress and the president over his taxes given that we're Trump's home state, we can help potentially avert a constitutional crisis if the House Ways and Means Committee wishes to avail itself of this new law," he added.

The bill is seen as a clear shot at the president, who has refused to release his tax returns. But it's been met with resistance from the one Democrat who could actually utilize it.

House Ways and Means Chairman Richard Neal, D-Mass., said he won't request the state returns because he feels doing so would harm his efforts at obtaining Trump's federal returns. Last week, Neal sued the IRS and the Treasury Department for those federal returns.

Hoylman said the state Legislature has "given Congress a constitutional escape hatch should they not want to wait for the federal court case and its appeals process to be finalized, which potentially could take months to years."

"But, I leave it to the wisdom of the congressional tax committees to determine how they're going to utilize this legislation, if they are at all," he added.

Neal did not immediately respond to a request for comment from NBC News.

Opponents of the legislation criticized it as "political," with one Republican assemblyman, Doug Smith, saying in May as the legislation was being debated that lawmakers were "using this body as a weapon against" Trump.

Meanwhile, Cuomo could act soon on another bill that is aimed at Trump.

That legislation would allow state prosecutors to pursue charges against certain people even if they had received a presidential pardon. Trump has spoken about the possibility of pardoning those accused or convicted of crimes stemming from former special counsel Robert Mueller's investigation.