Adam Yarmolinsky, 77, a top Defense Department official in the Kennedy Administration who later played a pivotal role in designing President Lyndon B. Johnson's antipoverty program, died of leukemia Jan. 5 at Georgetown University Hospital. He lived in Washington.

Mr. Yarmolinsky, a lawyer, academician and author, was said to have been one of the brightest of the "whiz kids" brought to the Pentagon by Secretary Robert S. McNamara to run the Defense Department in the early years of the Kennedy administration.

In 1964, after Kennedy had been assassinated, Mr. Yarmolinsky was loaned by the Defense Department to R. Sargent Shriver to help draw up legislation for a comprehensive war on poverty that Johnson wanted passed before the November presidential election. Syndicated columnists Rowland Evans and Robert Novak described Mr. Yarmolinsky as the "chief midwife on the hurried birth of the poverty program."

But in August of that year, with the legislation still pending, word was passed that Mr. Yarmolinsky was in line to be Shriver's chief deputy in the administration of the antipoverty effort. That angered key southern congressmen who had resented Mr. Yarmolinsky's liberal politics and his work as a Defense official to desegregate public facilities in southern communities near military bases. The legislators let it be known they would vote against the poverty program unless Mr. Yarmolinsky was jettisoned, which he was, after a showdown in the office of House Speaker John McCormack (D-Mass.).

Mr. Yarmolinsky returned to the Defense Department, believing he had been promised an appointment later as the department's general counsel. But that job never materialized, and instead he was named to a less influential position. He left Washington in 1966 to teach at Harvard Law School and Harvard's Institute of Politics at the Kennedy School of Government.

"Of course I'm bitter," he would tell The Washington Post 11 years later. In the interim, and from the vantage point of academia, he had written an article, which he called "The Corridors of Power," about his Washington experience.

"I had forgotten how long and narrow the corridors were," he wrote, "and how the people in the rooms off the corridors didn't bother to look out the windows much. These are not, I thought, the corridors that novelists write about. In fact they look more like the corridors of impotence, and their perspective, narrowing into dimness, makes the people in them seem smaller, not bigger, than the people outside."

In 1977, Mr. Yarmolinsky returned to Washington as counselor to the U.S. Arms Control and Disarmament Agency. Later he practiced law, then in 1985 began teaching in the graduate program in policy sciences at the University of Maryland at Baltimore County. From 1987 to 1993, he was provost and vice president for academic affairs at UMBC. Since 1993, he had been regents professor of public policy in the University of Maryland System.

He was born in New York, graduated from Harvard College, served in the Army Air Forces during World War II, then received a law degree from Yale Law School.

He was clerk to Chief Judge Charles E. Clark of the U.S. Court of Appeals for the 2nd Circuit in New York, then in 1950 came to Washington as clerk for Supreme Court Justice Stanley F. Reed.

He practiced law in Washington with Cleary, Gottlieb, Friendly and Ball, served two years as secretary at the Fund for the Republic and then was public affairs editor for Doubleday and Co.

After John F. Kennedy's election as president in 1960, Mr. Yarmolinsky helped recruit people to staff the new administration, then joined the Defense Department as a top assistant to McNamara. In that role, he was known to have stepped on the toes of several high-ranking military officers as an enforcer of McNamara's directive to centralize authority. He acquired the nickname "Cardinal Richelieu of the Pentagon," and he seemed to provoke controversy easily. He was a political liberal among conservatives, and he was said to have been witty, brilliant and perceptive, but also impatient, blunt and sometimes arrogant. He was called a "satanic integrationist" in the Thunderbolt, the segregationist newspaper of the National States' Rights Party, for his staff work on integration of armed forces facilities.

Dark-haired and short of stature at 5 feet 4 inches tall, Mr. Yarmolinsky was once described by columnists Evans and Novak as having "the misfortune of looking like the anarchist bomb thrower in old political cartoons." For a costume party during his early years in Washington, he was once given a steel-wool mask to wear. He would admit years later that the gesture "sort of sums me up" for that period.

Recalling his service in the Kennedy administration in a 1983 interview with The Post, a mellowed Mr. Yarmolinsky said: "We were more than a little arrogant, we more than a little exaggerated the importance of what we were doing . . . but I think we made a significant difference."

When he left Washington in 1966, Mr. Yarmolinsky was awarded the Defense Department's Distinguished Civilian Public Service Medal. In a statement yesterday, Shriver said, "Heroic is the word to accurately describe Adam Yarmolinsky's service to his country, to his fellow men and women and the Institutions, both public and private, where he served. . . ."

Mr. Yarmolinsky had written articles in periodicals and newspapers, including The Post. His publications included "Case Studies in Personal Security" (1955), "Recognition of Excellence" (1960), "The Military Establishment" (1971), "Race and Schooling in the City" (1981), "Paradoxes of Power" (1983) and "Rethinking Liberal Education" (1996).

His marriage to Harriet Rypins ended in divorce, and his second wife, Jane Cox Vonnegut Yarmolinsky, died in 1986.

Survivors include his wife, Sara A. Ellis of Washington; four children from his first marriage, Ben and Sally Yarmolinsky, both of New York, and Toby and Matthew Yarmolinsky, both of Boston; a brother, Michael Yarmolinsky of Washington; and five grandchildren.

CAPTION: Adam Yarmolinsky was an aide to Defense Secretary McNamara.