Say you want to impeach a very high government official whose conduct has been not only outrageous but extra-legal; and say your political party controls the Senate by more than the two-thirds majority necessary for a conviction; and say you have as lead prosecutor the country’s most formidable orator, who has already successfully led the charge against the official in the House—given all this, how do you bungle the job?

The target was a deserving one: Associate Justice of the Supreme Court Samuel Chase’s history of bad behavior dated back to 1780, when, despite being an enthusiastic signer of the Declaration of Independence, he hampered the Continental Army by trying to corner the flour market, and then lied about it to Congress. That earned him a scathing newspaper rebuke from Alexander Hamilton. In 1787 he was one of the few delegates to the Constitutional Convention to actively campaign against ratification. Because of that, George Washington declined to appoint him as the country’s first attorney general. By 1796, though, Chase had become an ardent enough Federalist for Washington to elevate him from the Maryland Supreme Court to the U.S. Supreme Court.

“I never sat with [Chase] without pain, as he was forever getting into some intemperate and unnecessary squabble,” a colleague on the state bench wrote. And Chase’s lead defense lawyer during his impeachment, Luther Martin, later referred to him and Aaron Burr (whom Martin also defended, on a treason charge) as “a couple of the greatest rascals in the world.”

From the bench Chase regularly made nasty ex parte remarks, derided prosecution and defense attorneys in ways that biased case presentations and jury verdicts, refused to dismiss obviously biased jurors from trials, and even gave a fiery political speech during a trial, venting his hatred of the “excessive democracy” he associated with Thomas Jefferson and the Democrat-Republicans. These no-nos were the bases for the impeachment charges against him.

Was the impeachment political? Absolutely.

After the Federalists had been in power for a dozen years, in the election of 1800 they lost the House, the Senate, and the presidency to the Democrat-Republicans. Their lame-duck attempt to hold on to power through control of the judiciary, the Judiciary Act of 1801, reduced the Supreme Court’s complement from six to five justices (making it harder for Jefferson to appoint a majority) and decreed 16 new district courts, to which outgoing President John Adams appointed “midnight judges” so blatantly partisan that Jefferson told Abigail Adams they were “among my most ardent political enemies.” Fighting back, the Democrat-Republicans repealed the Judiciary Act and successfully impeached and removed John Pickering, the district court judge of New Hampshire, for being so continuously drunk and possibly insane that he was completely incompetent. Within an hour of the Senate convicting Pickering on March 12, 1804, the House indicted Chase.

Two prominent Jefferson cousins were involved: Chief Justice John Marshall, who had recently beaten the administration in Marbury v. Madison (1803), and would be a star defense witness; and John Randolph of Roanoke, chairman of the House Ways and Means Committee, who had shepherded the indictment through the House and would lead the charge in the Senate. Randolph had recently declared himself a “tertium quid,” or a third something—no longer a Federalist or a Democrat-Republican. One of the strangest men ever in Congress, he was deathly pale, thin, beardless, and had a voice so high that it squeaked, due to what an autopsy would reveal were under-developed testicles. Booted and spurred, wearing a fringed-leather hunting outfit, carrying a whip to control the dogs he brought with him into Congress, Randolph when not terrorizing the representatives as “a flowing gargoyle of vituperation” was charming them with incisive, elegant rhetoric.

The Senate, which would act as a jury, was then composed of 25 Democrat-Republicans and 9 Federalists. A conviction vote required 23 senators.

In late 1804, Jefferson won re-election in a landslide with a new vice president on his ticket, George Clinton. When the impeachment trial began in February 1805, it was before the lame-duck Vice President Aaron Burr, just returning to the Senate for the first time since killing Hamilton in their famous duel.

The trial took 22 days and attracted the largest public crowds ever in the Senate chamber, including foreign dignitaries, but it was a dull affair even when Randolph was speaking.

The end result: Chase walked.

The closest the senators came to conviction was an 18 to 16 vote on one of eight counts. How did the Democrat-Republicans snatch defeat from the jaws of victory?

Distaste for Randolph. While John Randolph was a dazzling orator, he was not a lawyer, and the trial turned on legal points. His in-your-face antics had served him well in the House, where he held considerable power and did not hesitate to use it to force members to vote his way, but in the Senate he had no clout. His strengths, writes David Johnson, Randolph’s most recent biographer, were “ill suited for a legal proceeding,” and Randolph became “tangled in the legal traps he had unwittingly laid out” in the indictment. He failed to make the case that Chase’s conduct had risen to the level of criminality, and did not give Democrat-Republican senators much to hold onto because he never clearly stated the House’s quite legitimate theory of the case, “that impeachment and removal constituted the only remedy for misuse of power.”

Senator John Quincy Adams of Massachusetts recorded in his diary various colleagues’ dislike for Randolph during the proceedings, presumably enough to vote against him out of spite. When Randolph learned that two senators had dissed him for “calumny,” he confronted them and extracted denials. Both finally voted for acquittal.

Distaste for Burr. The vice president won praise for his even-handed presiding over the proceedings. According to a die-hard Hamiltonian Federalist, Senator William Plumer of New Hampshire, during the trial Burr “dropped his nonchalant veneer” and appeared “uneasy, discontented and harried.” But Plumer was aghast that a man indicted in New Jersey for the murder of an American idol was presiding, and his revulsion was shared by some Democrat-Republican colleagues, heightening their unease at the prospect of voting to convict a Supreme Court justice for snippy behavior.

Chase’s dream team. Martin and the other defense lawyers, the most prominent legal minds in the country, made a convincing case that Chase had done no worse than other judges and lawyers, and that the independence of the judiciary was at stake. Slippery slope, anyone? Defense witness Chief Justice Marshall danced around Randolph’s inept examination and wouldn’t give a straightforward answer to Burr’s direct questioning about Chase’s judicial conduct. Chase’s team hammered the point that judges should only be removed “for treason, bribery, corruption or other high crime or misdemeanor.” To senators under assault by numerous letters and from visits by prominent lawyers, it seemed that Chase had the entire American legal establishment behind him. That swayed a vote or two over to acquittal.

Absent party leaders. To successfully convict a high official in an impeachment trial requires close supervision by the heads of the political party bringing the charges, as senatorial arms need to be twisted by threats and promises. But Jefferson and Secretary of State Madison stayed far away from the proceedings, and their absence rendered on-the-fence senators more vulnerable to what throughout our history has almost always worked to sway the Senate, the don’t-rock-the-boat argument, which in this case meant not risking a legislative-branch war with the judiciary by convicting a Supreme Court justice.

After the acquittal, Madison was reported as snickering at Randolph’s embarrassment, and Jefferson—who Rehnquist suggests had cooled on the impeachment in the year since first suggesting it to the House—did not further pursue Chase as he continued to try to reverse Federalist control of the courts.

After Chase returned to the Supreme Court, he appeared chastened, and never again engaged in ex parte communications, or made political speeches, or unduly berated lawyers before the bench. He remained on the Court until his death in 1811.

One sentence from the Senate trial proceedings has as much relevance today as it did then. It was uttered during a summation by Joseph Hopper Nicholson, one of the House leaders of the prosecution team:

“If the laws are not faithfully administered; if the holy sanctuary of our courts is to be invaded by party feeling… we may indeed boast that we live in a land of freedom, but the boast will be vain and illusory.”