A Harper’s Weekly cartoon shows a plump, middle-aged man sitting on one side of the Supreme Court bench, tipping its balance. With his right hand, he proudly holds a paper that says, “BY ONE VOTE” — a reference to the narrow margin by which he was installed to the high court.

Before Brett M. Kavanaugh, there was Stanley Matthews, whose confirmation was so fraught and divisive that it took a second nomination to cement his place on the Supreme Court. President Rutherford B. Hayes, Matthews’s old friend from his home state of Ohio, selected him in 1881, but his nomination languished in the Senate Judiciary Committee without a vote. Newly elected President James A. Garfield promptly renominated Matthews, and the Senate confirmed him on a 24-23 vote — the narrowest margin in the Supreme Court’s history.

One-hundred and thirty-seven years later, another divided Senate would confirm Kavanaugh on a 50-48 vote. The parallelism between the two judges' contentious confirmation battles was first reported by the National Constitution Center, a Philadelphia-based nonprofit museum about the Constitution.

Like Kavanaugh’s, Matthews’s confirmation was condemned by some in the media. The Philadelphia Times said it was proof that a “moral dry-rot has taken hold of some of the public men of the country.”

“To see Stanley Matthews don the robe and go upon the bench will be the saddest thing yet witnessed by those who have watched with pain the gradual degradation of the bench,” the May 17, 1881, article said.

Matthews’s career was deeply tangled in politics and the judiciary. Born in Lexington, Ky., he studied law in Cincinnati and was admitted to the bar before he was 20. He became a county prosecutor, a county judge, an Ohio state senator, a federal prosecutor, a military officer during the Civil War, an unsuccessful candidate for the House of Representatives and a U.S. senator — all in just three decades and with years of private legal practice in between.

As a young lawyer, he espoused anti-slavery principles. But as a U.S. attorney 15 years later, he prosecuted a newspaper editor for helping runaway slaves.

As a private attorney, he represented railroad tycoons and corporate interests. As a lieutenant colonel of the 23rd Ohio Volunteer Infantry, he served under Hayes, a college friend and future president with whom he was related by marriage.

And as a friend to Hayes, Matthews was instrumental in his election to the presidency — a win so highly disputed that the elements of the press dubbed Hayes “Rutherfraud” and “His Fraudulency.”

These entanglements all complicated Matthews’s rise to the Supreme Court.

Critics said he was an opportunist who abandoned his anti-slavery principles for the sake of political expediency. They saw him as beholden to the railroad magnates who paid him handsomely as their lawyer. One of his former clients was Jay Gould, who controlled the largest railroad company in the country, according to the National Constitution Center.

But perhaps Matthews’s most complicated entanglement was his personal and professional connection to Hayes.

The election of 1876 was one of the most contentious in history. Hayes’s Democratic opponent, New York Gov. Samuel Tilden, won the popular vote by 250,000 and was one electoral college vote short of victory. But the results from three Southern states — Florida, Louisiana and South Carolina — were disputed, with both parties claiming to have won all three.

Congress created a bipartisan, 15-member electoral commission to resolve the dispute. And Hayes tapped Matthews to be one of the attorneys to argue on his behalf before the commission. In that capacity, Matthews helped engineer the Wormley Compromise of 1877, a deal in which Southern Democrats agreed to concede if the federal government under Hayes would withdraw troops from the three states, provide funding for improvements in the South and appoint a Southerner to the Cabinet, according to Digital History.

The commission voted 8-to-7 to award the disputed 20 electoral college votes to Hayes.

Federal troops were withdrawn, as promised, allowing the three Southern states “to control their own affairs,” wrote Nicholas E. Hollis, who was director of the James Wormley Recognition Project. This marked the end of Reconstruction and paved the way for racial segregation and disenfranchisement of black voters in the South.

That Matthews, who once opposed slavery, was instrumental in this chain of events was noted by critics.

Toward the end of his term in 1881, Hayes nominated Matthews for the Supreme Court, an action widely seen as “improper patronage or even nepotism,” according to the National Constitution Center. Democrats, many of whom never stopped questioning the legitimacy of Hayes’s presidency, were frustrated that Republicans had been in control of the White House since the Civil War. And Hayes had already installed two Supreme Court justices.

The Senate Judiciary Committee refused to hear Matthews’s nomination.

Garfield, who succeeded Hayes, resubmitted it and was sharply criticized.

The New York Times wrote on March 15, 1881, that, unlike Hayes, Garfield “had no political or personal debts” to Matthews and “could hardly be blinded by personal relations.” Yet Garfield “repeated one of the most injudicious and objectionable acts of his predecessor,” the paper said.

“What motives and considerations could have led him into this blunder it is impossible to understand,” the Times wrote. Matthews’s appointment, it added, “will weaken in the estimation of the people a Supreme Bench which has already been too much compromised, and needs above all things to be strengthened.”

Matthews was a “brilliant lawyer,” the Boston Journal wrote on March 18, but he “lacks that balance necessary to make him a member of the highest court in the Nation.”

The Senate confirmed Matthews on May 12 after a fierce debate. He was sworn in five days later.

A May 13 Washington Post article about his confirmation again invoked his connection to the railroad industry: “He had been a railroad lawyer all his life, and, consequently, when questions came up before him relating to railroads, in rendering his opinions, his mind would naturally follow its past education.”

Those who supported Matthews — Southern senators — described him as “very accomplished” and “scholarly” and argued he would be fair and honest in deciding political cases, according to the Post article.

Matthews was regarded as one of the more progressive justices on the bench. In one of his most notable opinions, Yick Wo v. Hopkins (1886), Matthews found that a San Francisco ordinance regulating licensing of laundries discriminated against Chinese laundry workers.

He died of an illness in 1888 after serving for only seven years on the Supreme Court.

Read more: