President Joe Biden characterized the Supreme Court as "destabilizing" Thursday, but previously criticized former President Donald Trump for attacking the courts.

Biden remarked in 2017 that the former president's criticism of "institutional structures that govern us" was "dangerous" during an event in Washington, D.C., The New York Daily News reported at the time. He then urged Trump to take a more "presidential" tone in the future.

"When you delegitimize the courts, you delegitimize the legislative body, it's corrosive and it makes it almost impossible to reach compromise," Biden said during the 2017 speech. "We're a diverse nation... this democracy, in order to function, you have to remember it requires consensus at the end of the day."

DEMOCRATS ATTACK SUPREME COURT'S LEGITIMACY AFTER LEAKED OPINION SUGGESTS ROE V. WADE TO BE OVERTURNED 

"Without consensus we have chaos and it's not just Joe Biden saying this, it's our Constitution," he continued. "We know the court when it rules has the right to overrule a Congress or a president."

President Biden at a NATO summit in Madrid

President Biden sharply criticized the Supreme Court on Thursday but he previously warned that undermining the court's legitimacy was "dangerous."  (Jonathan Ernst/Pool Photo via AP)

Throughout his presidency, Trump criticized various federal courts and said Justice Sonia Sotomayor and the late former Justice Ruth Bader Ginsburg should recuse themselves from cases involving him, according to the Brennan Center for Justice.

However, Biden and several Democratic lawmakers have launched attacks of their own against the Supreme Court in recent days, with some top Democrats calling into question the court's legitimacy.

AOC CALLS SUPREME COURT EPA RULING ON POWER PLANT EMISSIONS 'CATASTROPHIC'

"The one thing that has been destabilizing is the outrageous behavior of the Supreme Court of the United States on overruling not only Roe v. Wade, but essentially challenging the right to privacy," the president said Thursday during a press conference in Spain.

"So I — I can understand why the American people are frustrated because of what the Supreme Court did," he added.

Both Sen. Elizabeth Warren, D-Mass., and Rep. Alexandria Ocasio-Cortez, D-N.Y., have similarly criticized the court following recent decisions related to abortion and climate change.

CLICK HERE TO GET THE FOX NEWS APP

"This radical Supreme Court is increasingly facing a legitimacy crisis, and we can't let them have the last word," Warren tweeted Thursday.

The White House didn't respond to a request for comment.