President Donald Trump on Tuesday filed a lawsuit seeking to prevent the House Ways and Means Committee from obtaining his state tax returns through a newly passed New York law.

The president's lawyers said the state law was nothing more than an effort to get information about his personal finances to embarrass him politically.

The suit referred to an NBC News article on Monday that said Ways and Means Chairman Richard Neal, D-Mass., was under pressure from fellow Democrats to make use of the new law.

The suit asks the court to provide a declaratory judgment that the committee "lacks a legitimate legislative purpose for obtaining the President's state tax information."

The lawsuit asserts that the law, called the TRUST Act, violates Trump's First Amendment rights. It seeks to block the Ways and Means Committee from being able to request the taxes through the law, prevent New York Attorney General Letitia James from enforcing it, and stop New York Department of Taxation and Finance Commissioner Michael Schmidt from complying with any request for Trump's tax filings.

"The House Rules authorize the Committee to oversee 'Federal laws,' not state tax laws," says the suit, filed in the U.S. District Court in the District of Columbia. "And nothing in the House Rules allows the Committee to demand the private financial information of a sitting President."

The president's personal attorney, Jay Sekulow, said in a statement that the lawsuit was filed as part of "our ongoing efforts to end Presidential harassment."

"The targeting of the president by the House Ways and Means Committee, the New York Attorney General, and a New York tax official violates article 1 of the U.S. Constitution," he said. "The harassment tactics lack a legitimate legislative purpose."

The New York law allows the chairmen of three congressional tax-related committees — the House Ways and Means Committee, Senate Finance Committee and Joint Committee on Taxation — to request the state returns of public officials only after efforts to gain access to federal tax filings through the Treasury Department have failed. Neal is the only Democrat who can use the law.

The legislation states that any "legitimate task" of Congress is a valid reason to make the request, should efforts to obtain the returns at the federal level be stonewalled by the Treasury Department. New York state tax filings are not identical to the federal returns, but contain much of the same information.

"I have every confidence that the president’s legal challenge will fail and New York’s standing offer to support Congress in its oversight role on taxes will remain in effect," New York state Assemblyman David Buchwald, a Democrat who sponsored the legislation, said in a statement. "It's no surprise that the President has moved quickly in an attempt to strike down New York’s tax transparency law as he is fighting the release of his tax returns on every front."

The bill, signed into law this month, was written broadly and makes it easier for New York to turn over the state tax returns of certain public officials to Congress.

"President Trump has spent his career hiding behind lawsuits, but, as New York’s chief law enforcement officer, I can assure him that no one is above the law — not even the president of the United States," James said in a statement. "The TRUST Act will shine a light on the president’s finances and finally offer transparency to millions of Americans yearning to know the truth. We have all the confidence that this law is legal and we will vigorously defend it against any court challenge."

Neal said last month he wouldn't use the law to request the state returns because he feels it could harm his attempt at getting the federal filings. Neal sued the Internal Revenue Service and Treasury Department for those returns citing a section of tax law that states the Treasury Secretary "shall furnish" to congressional tax committees "any return or return information" request by its chairman. The stated purpose of Neal's request is to review the IRS process for auditing presidential returns.

Earlier this month, Neal said House counsel was "reviewing" the law and had "some legitimate concerns" regarding it.

But he is under pressure from Democrats to act. An aide to a Democratic member of Ways and Means told NBC News in a report on Monday that "there has been widespread frustration from members of the committee at how slowly this process has moved."

"We respect his focus on moving rapidly on health care, tax policy and pensions, but at the same time many of us have tried to express the sense of urgency which we and our constituents feel about enforcing the law and obtaining Trump's tax returns, and we just haven’t seen that sense of urgency reflected over the past six months," the aide added.

Rep. Bill Pascrell, D-N.J., another Ways and Means member, expressed openness to using the New York law, saying he appreciated what the New York Legislature and Gov. Andrew Cuomo were trying to accomplish.

"We should investigate any tool provided us that might shed sunlight on Trump's tax return history, including his tax reporting practices and the results of any IRS audits," Pascrell said.

Trump broke with decades of tradition by refusing to release his returns while running for the presidency, claiming he was under audit. Such an audit would not preclude him from releasing the returns, however. A president's returns undergo IRS audits annually.

Representatives for Cuomo and the New York Department of Taxation and Finance did not immediately respond to requests for comment from NBC News.