WASHINGTON — President Trump sued New York State officials and the House Ways and Means Committee on Tuesday to try to block congressional Democrats from using a recently enacted New York law to obtain his state tax returns.

[Update: Trump ordered to turn over tax returns to Manhattan D.A.]

The lawsuit, filed by the president’s private lawyers in federal court in Washington, opens a new front in Mr. Trump’s fight to keep his tax returns secret. His administration has already rejected subpoenas from the Ways and Means Committee for his federal tax information, prompting the House to file a lawsuit of its own in recent weeks seeking enforcement.

Now Mr. Trump is moving to close a side door opened by Democratic lawmakers in his home state by asking a judge to declare that the Ways and Means Committee “lacks a legitimate legislative purpose” to request his state tax returns. The suit also seeks to nullify the New York law outright before Congress decides whether to use it.

[Read the lawsuit filed by Mr. Trump’s lawyers.]

“We have filed a lawsuit today in our ongoing efforts to end presidential harassment,” Jay Sekulow, a lawyer for Mr. Trump, said in a statement. “The actions taken by the House and New York officials are nothing more than political retribution.”