A House committee sued the Trump administration in federal court on Tuesday for access to Donald Trump’s tax returns, setting up a legal showdown over the records.

The House ways and means committee said it needed the documents for an investigation into tax law compliance by the president, among other things. It asked the court to order the administration to turn over the documents.

In the suit, the committee said the administration had refused to turn over the documents “in order to shield President Trump’s tax return information from Congressional scrutiny”. The committee said it was not required to explain to the treasury department its reasons for seeking the tax return information but that in this case the committee’s need is “evident”.

“Without reviewing the requested return materials, the Committee cannot ensure that the IRS’s audit process is functioning fairly and effectively, understand how provisions of the tax code are impacted by President Trump’s returns or exercise its legislative judgment to determine whether changes to the code may be warranted,” the lawsuit said, adding that the president had “declined to follow the practice of every elected President since Richard Nixon of voluntarily disclosing their tax returns”.

In a statement, Steven Groves, the White House deputy press secretary, accused the Democrats of partisan motives and “presidential harassment”, adding: “The only thing more political than the Committee’s crusade for the President’s tax returns is its sham lawsuit.”

The lawsuit is the culmination of a long-running fight between Democrats and Trump over the returns, dating back to the 2016 campaign, when Trump claimed that he could not release them due to an IRS audit. The records hold the promise of information that Trump has carefully guarded from public view, including about his business entanglements, relationships with foreign creditors and governments, and the value of his assets.

Trump tax returns: Steven Mnuchin refuses to comply with subpoena Read more

The committee originally demanded six years of Trump’s tax records in early April under a law that says the Internal Revenue Service “shall furnish” the returns of any taxpayer to a handful of top lawmakers. But the treasury secretary, Steven Mnuchin, told the committee in May that he would not be turning over the returns to the Democratic-controlled House.

Mnuchin concluded that the treasury department was “not authorized to disclose the requested returns and return information”. The justice department backed Mnuchin’s position in a legal opinion, saying the request lacked a legitimate legislative purpose and was an “unprecedented” use of congressional authority.

The argument is the same one Trump has used in refusing other demands from Congress for financial records from accountants and banks Trump and his family have done business with. Lawsuits over those records were filed in federal courts in Washington and New York, and Trump has lost in those lawsuits’ opening rounds.

It’s unclear how long it will take to resolve the lawsuit. Fights between Congress and the executive branch can in some cases take years, and the administration may be eager to make the lawsuit last in order to delay providing records. But if, as the committee suggests, the fight comes down to the text of what the law requires, a resolution could come more quickly, though it could be appealed.

Steve Rosenthal, a senior fellow at the nonpartisan Urban-Brookings Tax Policy Center, said the committee is on strong legal footing with the lawsuit because “it is entitled to oversee and investigate the executive branch, which is a key element of our checks and balances”.