David O. "Doc" Cooke, 81, the high-ranking administrative director who was known as the "Mayor of the Pentagon" for his work over six decades to keep the gargantuan complex humming, died June 22 at the University of Virginia Medical Center.

He died of injuries received June 6 in a car accident two miles north of Ruckersville, Va., when his vehicle veered off Route 29 and rolled over several times, Greene County Sheriff William Morris said yesterday. It wasn't known what caused the accident, Morris said.

Mr. Cooke had served at the Pentagon since the late 1950s and as its top civil servant had a hand in every major Defense Department reorganization during that time. He knew virtually every inch of the 20 miles of corridors in the building and was the department's highest-ranking career civil servant.

As Defense Department director of administration and management, he had a vast institutional memory and numerous friends spread throughout Washington's power structure. It meant that he had the ear and respect of flag officers, members of Congress and Cabinet officials -- and not only because he dispensed office space and the Pentagon's 8,770 parking places.

In a 2001 edition of Government Executive Magazine, editor Timothy B. Clark called Mr. Cooke "a force for good in the federal government."

Mr. Cooke's many honors included seven awards of the Defense Medal for Distinguished Civilian Service. In 1999, he was given the President's Award for Distinguished Federal Service, the highest government service award.

Mr. Cooke called in some of his considerable chits in the late 1980s and early 1990s as he argued vociferously for a billion-dollar renovation of the Pentagon. Up until Sept. 11, it was scheduled for completion in 2004.

The hijacked airliner that slammed into the side of the building that day, killing 189 people, hit a wedge of the Pentagon that had undergone upgrading. Some of those features supported by Mr. Cooke have been credited with saving many lives.

"The steel that we used to strengthen the walls, the blast-resistant windows, the Kevlar cloth, all those things working together helped protect countless people," Walker Lee Evey, the program manager for the Pentagon renovation, said. "Doc Cooke strongly supported all of these."

Mr. Cooke also was a strong supporter of the government as an institution and was active in good-government groups and community service projects.

He served on the President's Interagency Council on Administrative Management and was a leader of the Combined Federal Campaign and an active member of the American Society for Public Administration.

In the early 1990s, he worked to create a Public Service Academy at Anacostia High School that has been credited with improving the school's graduation rates. He also was known in the Pentagon as a strong promoter of employment opportunities for minorities, women and disabled people.

Mr. Cooke was born and raised in Buffalo, where his parents were teachers. He began following their path, receiving a bachelor's degree from the New York State Teachers College at Buffalo and later a master's degree in political science from the State University of New York at Albany.

His teaching career was interrupted by World War II, when he served as an officer aboard the USS Pennsylvania, a battleship that saw action in the Pacific.

Mr. Cooke returned to teach high school in Buffalo in the late 1940s, but was recalled to the Navy during the Korean War. After getting his law degree from George Washington University in 1950, he served as a Navy attorney and instructor.

His Pentagon career began in 1958, when he was assigned as a civilian to a Defense Department reorganization sought by then-Secretary Neil McElroy.

Mr. Cooke retained his professorial ways throughout his career, but his humor often helped leaven the serious atmosphere in the Pentagon. Mr. Cooke was just as likely to quote a Greek philosopher as a pithy joke or homespun tale.

Evey, the Pentagon renovation manager, recalled an aside at a dedication ceremony last summer. "He said that he took it as a sign that the building needed to be renovated when the fungus on the wall took the shape of Elvis," he said.

Mr. Cooke was not laughing when he argued in the 1980s for the renovation and for the Pentagon to be transferred from under the auspices of the General Services Administration to the Defense Department. He said it was a crucial step in rehabilitating the world's largest office building.

Mr. Cooke would make routine trips to Capitol Hill with what he called his "horror board," a convincing collage of fallen asbestos or rotted piping from the Pentagon.

In 1998, Mr. Cooke testified before a federal grand jury about alleged leaks by then-Assistant Defense Secretary Kenneth Bacon of personnel information about Linda Trip to a reporter. With characteristic good humor, he told reporters after he testified that Tripp's name came up "now and again."

Mr. Cooke was a presence on Sept. 11, rushing to aid rescue and recovery operations. In the months after the rebuilding began, the usually low-key administrator began making more public appearances, speaking in memory of the victims.

At a speech in November, he told an Albany, N.Y., crowd: "The damage to the building will be rebuilt. You'll never know the difference eventually."

His wife of 52 years, Marion McDonald Cooke, died in 1999.

Survivors include three children, Michele C. Sutton of Springfield and David Cooke and Lot Cooke, both of Fairfax; and four grandchildren.

DAVID O. 'DOC' COOKE