Donald Trump’s tax returns have been ordered by the U.S. Supreme Court to be handed over to House Democrats, bringing an end to a lengthy legal challenge brought on by the former president — and Trump is not happy.

In a post on Truth Social, Trump called the decision "unprecedented" and said it "creates [a] terrible precedent for future Presidents."

"Why would anybody be surprised that the Supreme Court has ruled against me, they always do! It is unprecedented to be handing over Tax Returns, & it creates [a] terrible precedent for future Presidents," Trump wrote in a pair of posts.

A photo of Donald Trump

A photo of former President Trump at Mar-a-Lago in Palm Beach, Floridaa, Nov. 15, 2022.  (AP Photo/Andrew Harnik, File)

"The Supreme Court has lost its honor, prestige, and standing, & has become nothing more than a political body, with our Country paying the price. They refused to even look at the Election Hoax of 2020. Shame on them!" he added, including a rhetorical question about whether President Biden and his son Hunter Biden would undergo the same treatment.

SUPREME COURT ORDERS TRUMP'S TAX RETURNS TO BE TURNED OVER TO HOUSE DEMOCRATS

In a subsequent post, Trump called the highest court’s ruling "ridiculous."

"In the Supreme Court, the President of the United States does not have "standing" over his own election, how ridiculous?" he wrote.

For years, House Democrats have sought Trump’s tax records to investigate potential tax fraud or other wrongdoings by him or the Trump organization.

A photo of Rep. Richard Neal

House Ways and Means Committee Chair Rep. Richard Neal, D-Mass., speaks during a hearing on Capitol Hill in Washington, June 8, 2022.  (AP Photo/Jose Luis Magana)

A Democrat-controlled House Ways and Means Committee, led by Rep. Richard Neal, D-Mass., first requested six years of Trump's tax returns in 2019. This effort was swiftly blocked by the Trump administration, as he was still president at the time.

The Trump administration’s Treasury Department refused to turn over the records, but after President Biden won the White House, the new Justice Department reversed the previous administration’s decision.

DONALD TRUMP REACTS AFTER ELON MUSK REINSTATES HIS TWITTER ACCOUNT, ENDING LIFETIME BAN

In 2021, Biden’s DOJ said Congress should be allowed to review Trump’s tax returns.

Trump and his legal team immediately sued to block the Treasury Department from releasing the records and asked the Supreme Court to intervene — spurring the legal fight.

Lower courts had sided with the House committee, but Chief Justice John Roberts granted a stay in October, blocking the Treasury Department from handing over the records until the Supreme Court could rule on the case’s legality.

SUPREME COURT GRANTS A STAY, TEMPORARILY BLOCKS RELEASE OF TRUMP TAX RECORDS TO HOUSE DEMOCRATS

The Supreme Court Building

The Supreme Court in Washington, D.C., on Oct. 31, 2022. (Eric Lee for The Washington Post via Getty Images)

On Tuesday, Roberts denied Trump’s request and reversed his earlier blockage.

"The application for stay of the mandate presented to The Chief Justice and by him referred to the Court is denied," said a Supreme Court ruling. "The order heretofore entered by The Chief Justice is vacated."

The process for the release of the records comes after Republicans won a majority of the seats in the House of Representatives, giving them the power to choose majorities in each committee.

CLICK HERE TO GET THE FOX NEWS APP

It is not immediately clear whether Republicans, when they take over control of the House in Jan. 2023, intend to continue investigating the tax records.

Some Republicans have called for an investigation into Biden and his son’s business dealings when they take over power in the chamber.