Harry L. Carrico, who sat for 42 years on the Virginia Supreme Court and wrote a decision on interracial marriage that was overruled by the U.S. Supreme Court in what was regarded as a civil rights milestone, died Sunday in Richmond. He was 96.

A family spokeswoman said his health had declined after a fall while on a cruise in December. He was a Richmond resident and died at the Virginia Commonwealth University medical center.

His tenure as a justice was among the longest in the history of the state. Even after he formally retired, he continued to hear cases as a senior judge and had been on the bench as recently as December.

In a statement issued Sunday, Virginia Gov. Robert F. McDonnell (R) praised Justice Carrico’s “vigor for public service” during a seven-decade career.

Justice Carrico’s best known opinion came in 1966. He wrote the ruling by which the Virginia Supreme Court unanimously upheld the state law against interracial marriage. The case became known as Loving v. Virginia and was named for the mixed-race couple, Richard and Mildred Jeter Loving.

In this Wednesday, Feb. 12, 2003 file photo, retired Virginia Supreme Court Chief Justice Harry L. Carrico smiles as he is honored for his four decades of service by the Virginia House of Delegates. (Bob Brown/AP)

The Lovings had married in Washington in June 1958 but soon returned to their native Caroline County, a rural area between Richmond and Fredericksburg. At the time, about two dozen states, including Virginia, prohibited interracial marriage.

The Caroline County sheriff burst into the Lovings’ home that July, roused the couple from their bed and told them the District’s marriage certificate was invalid in Virginia. The Lovings were subsequently charged and prosecuted.

They pleaded guilty, and a Caroline County Circuit Court judge sentenced them to a year in jail. He suspended the sentence under the condition that the Lovings leave Virginia. They moved to Washington but later decided to appeal their conviction, with help from the American Civil Liberties Union.

In writing for Virginia’s Supreme Court, Justice Carrico said overturning the statute would be “judicial legislation in the rawest sense of the term.” A more legally appropriate forum for arguments against the law would be the state legislature, he wrote.

According to reference works, he also took the position that the state law did not violate the 14th Amendment because it imposed equal penalties on each member of a mixed-race couple.

However, the opinion he wrote found fault under the Constitution with the sentencing condition banning the couple from Virginia. The case was sent back to the trial court for resentencing.

In rejecting Justice Carrico’s position, the U.S. Supreme Court, led by Chief Justice Earl Warren, unanimously ruled in 1967 that the state law did in fact violate constitutional guarantees of due process and equal protection. The high court thus eliminated what was regarded as one of the last vestiges in the United States of segregation by law.

Richard Loving died in 1975 in a car accident. Mildred Loving died in 2008. New attention has been devoted to the Loving case in recent months in connection with the debate over laws prohibiting same-sex marriage.

In an interview Sunday, one of the lawyers who successfully challenged the miscegenation statute cautioned against identifying Justice Carrico too closely with the ruling he issued in 1966.

“In his later years, he acquitted himself quite well,” said Phil Hirschkop, the Northern Virginia lawyer who argued for the Lovings before the U.S. Supreme Court. “I don’t believe that if he had to redecide [the case] in his later years he would have decided the same way.”

Justice Carrico was admired for throwing a spotlight on the legal issues surrounding family violence in Virginia. He also advocated training lawyers in professionalism, saying that “commercialism has invaded the legal profession like a swarm of locusts. “

Harry Lee Carrico was born in Washington on Sept. 4, 1916, and grew up in Fauquier and Fairfax counties. After graduating from the old Lee-Jackson High School in Fairfax County, he received an associate’s degree from George Washington University in 1938 and a law degree from the university in 1942.

The next year, he was chosen to sit on Fairfax County’s Trial Justice Court, a predecessor of the current county court.

After Navy service in World War II, Justice Carrico worked in private practice before being named in 1956 to sit in Virginia’s 16th Judicial Circuit, which included Fairfax and Prince William counties and Alexandria. Five years later, Gov. J. Lindsay Almond Jr. (D) appointed him to the Supreme Court. In 1981, Justice Carrico was elevated by seniority to be chief justice.

He announced in 2002 that he would retire as chief justice the next year. Formal resignation appeared not to affect Justice Carrico’s activities. He continued to serve as a senior judge. Furthermore, he learned to rollerblade in his 70s. For many years beyond that, he continuing his practice of rising at 4:15 a.m. to ride his bicycle for up to 12 miles before reaching his office around 6:30.

His first wife, Elizabeth “Betty Lou” Peck, died in 1987 after 47 years of marriage. Survivors include his wife of 18 years, Lynn Brackenridge of Richmond; a daughter from his first marriage, Lucretia Carrico, a General District Court judge in Petersburg, Va.; a sister, Virginia Booker of Herndon; two grandchildren; and four great-grandchildren.

After Justice Carrico announced that he would retire, a successor was chosen for the first time by majority vote of the justices. They chose Leroy R. Hassell Sr., who became the first black chief justice on the court.

In a 2010 interview with the Richmond Times-Dispatch, Justice Carrico reflected on the Loving case and his conservative judicial philosophy that guided his decision.

“That case was decided on what the law was when [the opinion] was written, and up until that time, there was just no question that the regulation of marriage was strictly a state proposition,” he said.

“Whether I would do the same thing now or not is beside the point,” he said. “If I had been convinced after my research that it should have gone the other way, I’d have gone the other way. If you could find one word in there that is discriminatory, I’d like to know what it is.”

The Loving ruling was in keeping with Justice Carrico’s belief in following and not setting precedent, he told the Richmond paper.

“Sometimes you have a pretty strong urge to correct something that you know needs correcting, but if it’s beyond what you should do and what you shouldn’t do, then you shouldn’t do it,” he said. “Separation of powers is one of the bedrocks of our system of government.”