Walter T. McCarthy, 87, who in 42 years as a circuit court judge in Arlington ruled on issues ranging from racial desegregation to zoning and the eligibility of federal employes to hold elected local office, died March 18 in a hospital in Stuart, Fla., after a stroke. He had been on vacation there for the winter.

Judge McCarthy was only 32 in 1930 when he was appointed judge of Virginia's 16th judicial circuit, which then included Arlington, Fairfax and Prince William Counties and the city of Alexandria. He was the youngest circuit court judge ever appointed in Virginia at the time, and when he retired in 1972 he had served longer than any active judge in the state. In retirement, he continued to hear cases until 1980, completing half a century on the bench.

At a ceremony in 1970 honoring Judge McCarthy on the 40th anniversary of his appointment, Chief Justice of the United States Warren E. Burger, a resident of Arlington, called him "a great trial judge."

The chief justice said he was in the courthouse "probably to pay my taxes" and happened to stop in Judge McCarthy's courtroom.

"And there I saw the kind of performance I hoped to be capable of as a trial judge," Burger said.

When Judge McCarthy was named to the bench, Arlington and most of Northern Virginia were predominantly rural, life ran at a leisurely pace and it was even possible to pitch horseshoes outside the courthouses. Subsequent decades brought vast changes. In 1946 the judicial circuit was divided and Arlington became a separate circuit. Population growth and development became major issues, and, inevitably, questions of zoning came before the courts.

During the 1950s, Judge McCarthy ruled in a major decision that the Arlington County Board had the right to reject zoning applications in an effort to curb growth. That and many of his subsequent decisions formed the basis for much of the county's zoning law.

He also held in a 1958 ruling that a Virginia law permitting churches, movie theatres and other public places to require seating to be racially segregated was unconstitutional. He was the first judge in Arlington -- and one of the first in the southeastern United States -- to appoint a black jury commissioner.

In a controversial 1952 decision, Judge McCarthy removed from office three members of the Arlington County Board who were federal employes. He held unconstitutional a special exception for Arlington residents from a state law that prohibited federal employes from holding local office.

Judge McCarthy was born in Richmond and moved to Arlington when he was a young man. He entered George Washington University without ever having finished high school and he graduated from there and from GWU law school. He practiced law in Arlington before being named a judge.

He was an enthusiastic golfer and gardener, and he grew beans, squash, tomatoes and raspberries at his home.

Judge McCarthy is survived by his wife, Ruth Clark McCarthy, of Arlington; four sons, Steve and Wilson C., both of Vienna, Walter T. Jr., of Sweeney, Tex., and Robert C., of Arlington; a daughter, Helen Hopkins of McGaheysville, Va.; 13 grandchildren and four great-grandchildren.