An obscure federal statute makes it legal for Congress to obtain President Trump's tax returns for the last six years, and, through an additional loophole, can be made public, according to Judge Andrew Napolitano.

During an appearance on "Fox & Friends" on Thursday morning, the senior judicial analyst explained that the Chair of the House Committee on Ways and Means can compel the IRS to reveal anyone's tax returns, not just President Trump's, for any time period without reason. However, they are generally required to be kept secret and confidential.

"I honestly didn't know this statute existed because it's an obscure statute," Napolitano said. "The Chair of the House Ways and Means Committee, and/or the chair of the Senate Finance committee, can ask for anybody's tax returns, and the secretary, meaning the secretary of the treasury for whom the IRS works, shall furnish them. They don't have to give a reason."

The confidentiality of those records is a crucial part of the statute, in order to protect the privacy of the individual whom the records belong to. However, under certain circumstances, members of Congress can publicly reveal the records with immunity, Napolitano said.

HOUSE DEM ASKS IRS FOR 6 YEARS OF TRUMP'S TAX RETURNS, SETTING UP SHOWDOWN WITH WHITE HOUSE

TRUMP DISMISSES MAR-A-LAGO BREACH AS 'JUST A FLUKE,' DENIES KNOWING CINDY YANG

"If these tax returns goes to the House Ways and Means Committee, and any member of Congress gets them, that member of Congress can go to the floor of the House of Representatives, and the tax returns of the President of the United States become public," Napolitano continued.

Judge Nap predicted the attempt to obtain President Trump's business and personal tax records will lead to a fight in court, because Treasury Secretary Steven Mnuchin will likely not want to reveal that information to Democratic lawmakers.

CLICK HERE TO GET THE FOX NEWS APP

"Mnuchin is not going to release it voluntarily, even though the statute says that he must," Napolitano continued.

If that's the case, it could be months or even years before the issue of Trump's tax returns is resolved.

President Trump, meanwhile, does not seem particularly concerned about the newest effort from the new crop of House Democrats. When asked about whether or not he would comply with the request, he said that "until such time as I'm not under audit I would not be inclined to do that."