The jousting last week between President Donald Trump and U.S. Supreme Court Chief Justice John Roberts was hardly the first time presidents and chief justices have had notable disagreements.

The tit-for-tat ensued after Trump criticized a lower court federal judge in California who temporarily blocked the administration’s bid to revise asylum policies for would-be immigrants.

Trump referred to U.S. District Judge Jon S. Tigar, appointed by President Barack Obama in 2012, as an “Obama judge.” The president seemed to imply the judge wasn’t separating his personal political preferences from an honest interpretation of the law as written.

Roberts, in response to an inquiry from the Associated Press, subsequently asserted: “We do not have Obama judges or Trump judges, Bush judges or Clinton judges. What we have is an extraordinary group of dedicated judges doing their level best to do equal right to those appearing before them.”

Roberts was appointed to the high court by President George W. Bush.

Trump, not surprisingly, tweeted a rebuttal.

The Trump-Roberts dispute wasn’t the first time a president and chief justice have not seen eye to eye. Here are three major presidential feuds with chief justices.

1. Andrew Jackson vs. John Marshall

Lame-duck President John Adams named John Marshall to be chief justice after Adams lost his 1800 re-election bid, but before the inauguration of his successor, Thomas Jefferson, in 1801.

It was part of Adams’ move to leave a Federalist legacy on the high court before leaving office. Marshall, Adams’ secretary of state, would go on to be perhaps the most influential chief justice in history. Serving until 1835, Marshall remains to this day the longest-sitting chief justice in the court’s history.

Decades later, Marshall would be in a constitutional rivalry with President Andrew Jackson. Among Jackson’s best-known actions was vetoing the rechartering of the Bank of the United States. In 1819, years before Jackson was in the White House, Marshall ruled in the case of McCulloch v. Maryland, which favored a national bank.

After Jackson killed the bank with his 1832 veto, he found fault with Marshall’s 1819 opinion—asserting that the court should not be the final arbiter of what is constitutional.

Jackson wrote in his veto message:

It is as much the duty of the House of Representatives, of the Senate, and of the president to decide upon the constitutionality of any bill or resolution which may be presented to them for passage or approval as it is of the supreme judges when it may be brought before them for judicial decision.

The opinion of the judges has no more authority over Congress than the opinion of Congress has over the judges, and on that point the president is independent of both. The authority of the Supreme Court must not, therefore, be permitted to control the Congress or the Executive when acting in their legislative capacities, but to have only such influence as the force of their reasoning may deserve.

Jackson and Marshall would later also clash on a much larger issue after the court’s 1832 ruling in the case of Worcester v. Georgia. The Marshall court determined in a 5-1 ruling that the states are bound by federal treaties with Indian tribes. That included the Cherokee tribe, which resisted removal from Georgia.

“The Cherokee nation, then, is a distinct community occupying its own territory in which the laws of Georgia can have no force,” Marshall wrote in the majority opinion. “The whole intercourse between the United States and this nation, is, by our Constitution and laws, vested in the government of the United States.”

Undeterred, Jackson sent federal troops to force the Cherokee removal to migrate to present-day Oklahoma. Of the 15,000 Cherokees to make the forced journey, 4,000 died in what came to be known as “the Trail of Tears.”

Jackson was reported to have said, “John Marshall has made his decision, now let him enforce it.” However, the quote is apocryphal—and widely thought to be what is now called “fake news.”

Historians have noted the actual comment to a political ally was more nuanced, “The decision of the Supreme Court has fell [stillborn] … and they find that it cannot coerce Georgia to yield to its mandate.”

When Marshall died in 1835, Jackson honored the late jurist, clarifying that their clashes were on political and constitutional grounds, and not personal.

“I sometimes dissented from the constitutional expositions of John Marshall. I have always set a high value upon the good he has done for his country,” Jackson said. “The judicial opinions of John Marshall were expressed with the energy [and clarity], which were peculiar to his strong mind, and give him a rank among the greatest men of his age.”

2. Abraham Lincoln vs. Roger Taney

President Abraham Lincoln did not shy away from criticizing Chief Justice Roger Taney, who succeeded Marshall, when Taney ruled against the president’s Civil War actions.

As a Senate candidate from Illinois in 1858, Lincoln often railed against the Taney opinion in the Dred Scott v. Sandford case. The 7-2 majority opinion written by Taney largely nationalized slavery, and determined that Congress couldn’t prevent its spread in the territories.

Lincoln lost the Senate race, but was elected president two years later in 1860. On March 4, 1861, Taney administered the oath of office to the new president.

In his inaugural address, Lincoln didn’t mention Taney by name, but clearly targeted his majority opinion. Lincoln made a similar point about the Dred Scott decision that Jackson had made about Marshall’s national bank ruling; namely, that the court shouldn’t be the final arbiter on national policy.

Lincoln said:

The candid citizen must confess that if the policy of the government upon vital questions affecting the whole people is to be irrevocably fixed by decisions of the Supreme Court, the instant they are made in ordinary litigation between parties in personal actions, the people will have ceased to be their own rulers, having to that extent practically resigned their Government into the hands of that eminent tribunal.

Despite Southern sympathies, Taney was an avid unionist during the nullification crisis—when states, chiefly South Carolina, sought to ignore certain federal laws. Jackson named Taney, who had previously served as attorney general and Treasury secretary, to the high court first as an associate justice, then to replace Marshall.

During the Civil War, when Congress was out of session, Lincoln suspended the writ of habeas corpus, but only between Philadelphia and Washington, granting the military the authority to arrest and imprison suspected traitors without formal charges or due process.

In those days, justices would also hear circuit court cases. Taney heard the case of a Maryland man, John Merryman, who sued over his arrest. Taney ruled that under Article I, Section IX of the Constitution, only Congress could suspend the writ.

“The clause in the Constitution which authorizes the suspension of the privilege of the writ of habeas corpus is in the ninth section of the first article,” Taney ruled. “This article is devoted to the legislative department of the United States, and has not the slightest reference to the executive department.”

There were unverified claims by Lincoln critics that the president signed an arrest warrant for the chief justice, but the administration never made the arrest.

Taney continued, “I can see no ground whatever for supposing that the president in any emergency or in any state of things can authorize the suspension of the privilege of the writ of habeas corpus, or arrest a citizen except in aid of the judicial power.”

Lincoln took no action on Taney’s ruling, but addressed Congress about the need for suspending the writ in the midst of the national crisis. Congress authorized the suspension.

In making his case to Congress, Lincoln said the government has used the suspension “sparingly” and rhetorically asked, “Are all the laws but one to go unexecuted, and the government itself go to pieces lest that one be violated?”

Lincoln later took other extraordinary wartime measures. Chief among those was a blockade of Southern ports when Congress was out of session.

That made it to the Supreme Court, where Taney was on the losing end of a 5-4 decision upholding the constitutionality of Lincoln’s blockade.

In what might sound odd to many observers today concerned about judicial overreach, Taney wrote a friend in 1863 expressing concern about whether the Supreme Court would “ever again be restored to the authority and rank which the Constitution intended to confer upon it.”

3. Franklin D. Roosevelt vs. Charles Evans Hughes

President Franklin D. Roosevelt and Chief Justice Charles Evans Hughes were both former New York governors, but the Democratic president and 1916 Republican presidential nominee would clash about their very different views on what the Constitution allowed Congress to do in regulating the economy.

President Herbert Hoover, who lost the 1932 election to Roosevelt, named Hughes as chief justice in 1930 to replace Chief Justice William Howard Taft, a former president.

With sizable Democratic majorities in Congress and many Republicans concurring with the popular president’s agenda, Roosevelt saw the Supreme Court and Hughes as the biggest roadblock to New Deal legislation. Roosevelt derided the high court for striking down New Deal measures as unconstitutional.

The high court, in a unanimous ruling, invalidated the National Industrial Recovery Act in 1935. Hughes wrote the opinion for the court, asserting Congress gave too much power to the president, and exceeded its power to regulate interstate commerce.

The Hughes court next struck down the Agricultural Adjustment Act in a 6-3 ruling, determining that authority to regulate agricultural production resided in the states.

A frustrated Roosevelt tried to push the Judicial Procedures Reform Bill through Congress in 1937, thinking he would have the public behind him after winning a 1936 re-election landslide.

But he misread his political capital. The plan was more commonly known as a “court-packing scheme,” one in which Roosevelt would have added a new justice for every jurist over the age of 70.

Hughes wrote a letter to the Senate Judiciary Committee asserting the court was operating efficiently as it was. He also reached out to senators behind the scenes to assert it was a threat to an independent judiciary.

Even the Democratic majority in Congress wouldn’t accept what seemed like a power grab. Sen. Josiah Bailey, D-N.C., said the Supreme Court and the Constitution were threatened by the proposal.

“To weaken either is to weaken the foundations of our republic. To destroy either is to destroy the republic,” Bailey warned.

The Senate Judiciary Committee voted 10 to 8 to send the court-expansion bill to the floor with a recommendation that senators reject it, asserting, “The bill is an invasion of judicial power such as has never before been attempted in this country.”

However, it wasn’t entirely a loss for Roosevelt.

During the several weeks of Senate deliberation, the high court backed off, and many Democrats thought the pressure caused enough justices to flip-flop and decide in favor of other New Deal measures, such as the National Labor Relations Act and the Social Security Act.

Roosevelt supporters dubbed it “the switch in time that saved nine.” To this day, the Supreme Court comprises nine justices.

“We obtained 98 percent of all the objectives intended by the court plan,” the president said.