WASHINGTON — The Treasury Department said on Monday that it would not release President Trump’s tax returns to Congress, defying a request from House Democrats and setting up a legal battle likely to be resolved by the Supreme Court.

Steven Mnuchin, the Treasury secretary, wrote in a letter to Representative Richard E. Neal, Democrat of Massachusetts and the chairman of the House Ways and Means Committee, that Mr. Neal’s request for the tax returns “lacks a legitimate legislative purpose” and that he was not authorized to disclose them. The decision came after weeks of delays as Mr. Mnuchin said that his department and the Justice Department needed to study the provision of the tax code that Democrats were using to seek six years’ worth of the president’s personal and business tax returns.

The request for Mr. Trump’s taxes is the latest instance of the Trump administration rebuffing congressional oversight efforts.

“As you have recognized, the committee’s request is unprecedented, and it presents serious constitutional questions, the resolution of which may have lasting consequences for all taxpayers,” Mr. Mnuchin wrote in the one-page letter.