The Supreme Court on Monday ruled that the decisive vote in a California pay dispute case before a lower court doesn’t count -- because the vote came from a judge who died before the ruling was issued.

The case from the San Francisco-based 9th Circuit U.S. Court of Appeals involved a dispute over pay filed by a Fresno County government employee.

STEPHEN REINHARDT, CIRCUIT COURT JUDGE, 'PROGRESSIVE ICON,' DIES AT 87

Judge Stephen Reinhardt, who was seen as a progressive icon on the bench, heard the dispute and participated in a preliminary vote. The appeals court then issued an opinion in his name nine days after he passed away in March 2018.

But the high court, vacating the decision of a federal appeals court, said Monday that “federal judges are appointed for life, not for eternity.”

“The upshot is that Judge Reinhardt’s vote made a difference,” said the Supreme Court in its unsigned ruling. “Was that lawful?”

The justices said it was not. “Because Judge Reinhardt was no longer a judge at the time when the en banc decision in the case was filed, the 9th Circuit erred in counting him as a member of the majority.”

The Supreme Court itself follows the same practice.

The votes of Justice Antonin Scalia issued after his sudden death three years ago did not count, even though he had participated in a number of argued cases earlier in the court’s term. No decision is official until it is formally released by the court, and every member of the court must be on the bench at the time.

Reinhardt was one of the longest-serving federal judges when he died at age 87, and one of the most liberal on the 9th Circuit. He was appointed to the federal bench in 1980 by President Carter.

The case was sent back to the 9th Circuit for reconsideration.

Reinhardt died of a heart attack last year during a visit to a dermatologist in Los Angeles, the court spokesperson said.

When he died, Eric Garcetti, mayor of Los Angeles, called Reinhardt "one of the greatest jurists of our time. A searingly brilliant Angeleno and true progressive icon."

SUPREME COURT TO DECIDE IF WORLD WAR I MEMORIAL 'PEACE CROSS' CAN STAND

He was considered a liberal stalwart on the bench. He wrote in one opinion that a Trump administration order to deport a man who entered the country illegally nearly three decades ago and became a respected businessman in Hawaii was “inhumane” and “contrary to the values of the country and its legal system.”

In 2012, he wrote an opinion that struck down California’s gay marriage ban. He also wrote a 1996 opinion that struck down a Washington state law that prohibited doctors from prescribing medication to help terminally ill patients die.

He was among the federal judges who decided that overcrowding in California’s prison system was unconstitutional.

Reinhardt joined another judge in ruling that the words “under God” in the Pledge of Allegiance were unconstitutional, a decision that was later overturned.

Fox News’ Amy Lieu and The Associated Press contributed to this report.