Walt W. Rostow, 86, a key White House adviser during the Kennedy and Johnson administrations who was best known for aggressive advocacy of a hard-line military policy during the war in Vietnam, died Feb. 13 at a hospital in Austin. He was on kidney dialysis.

Mr. Rostow was Lyndon B. Johnson's special assistant for national security affairs in the final three years of the Johnson presidency, 1966 through 1969, the period of the greatest U.S. military commitment in the Southeast Asian war. He left Washington at the end of the Johnson presidency to become a professor of history and economics at the University of Texas at Austin.

A former professor of economic history at the Massachusetts Institute of Technology, he was an adviser on foreign affairs to John F. Kennedy when Kennedy was a Democratic senator from Massachusetts. When Kennedy became president in 1961, Mr. Rostow was an influential member of the corps of academic intellectuals Kennedy called to Washington to shape and staff the new administration.

"Rostow was always eager, hard-working . . . extremely considerate of others," author David Halberstam wrote in "The Best and the Brightest," his 1969 book about the men who managed the war in Vietnam. "Even during the heights of the great struggles of 1968, in the attempt to turn around war policy, when he was one of the last total defenders of the policy, many of his critics found him hard to dislike. . . . He could get along with the military, play tennis with them, understand their viewpoint."

A native of New York, Mr. Rostow graduated from Yale University and was a Rhodes Scholar at Balliol College in Oxford, England. He returned to Yale, where he received a doctorate in economics, then began his academic career as an economics instructor at Columbia.

During World War II, he served in the Office of Strategic Services, the predecessor agency to the Central Intelligence Agency. His wartime duties included the selection of bombing targets in Nazi Germany. More than two decades later, as a White House adviser on Vietnam, he retained his commitment to aerial bombing as an effective method of waging war.

After the war, he was a State Department specialist on German-Austrian economics, a professor at Oxford and Cambridge in England and executive secretary of the Economic Commission for Europe. He joined the MIT faculty in 1950 and remained there until coming to Washington with the Kennedy administration. As an economist, he drew international notice with a series of lectures at Cambridge on which he based a book, "The States of Economic Growth: A Non-Communist Manifesto." This was a description of five levels of economic development from primitive to high mass consumption.

From his professorship at MIT, Mr. Rostow was in regular contact with the nation's political leadership. In 1953, he supplied the first draft for a speech by President Dwight D. Eisenhower on disarmament in which the president declared that the United States would be willing to support a United Nations fund to aid economic development if peace were achieved.

He played a leading role in shaping several foreign policy statements by then-senator Kennedy in the 1950s, and he was author of the Kennedy campaign slogan, "Let's get this country moving again." He came to Washington as deputy to McGeorge Bundy, national security adviser at the Kennedy White House, and he brought with him a strongly held opinion that the United States should be prepared to move against communism in Southeast Asia.

Halberstam described him as "ever enthusiastic and ready to use force." In 1967, he indicated to the president his "preference," as he called it, to "invade the southern part of North Vietnam."

In 1971, he spoke out against publication of the Pentagon Papers in the New York Times and later The Washington Post and other newspapers. These were classified documents tracing the history of U.S. involvement in Vietnam. Mr. Rostow said they reflected only a small portion of the decision-making process that led to the war, which he said was worth its cost in lives and money in the effort to maintain a balance of power in Southeast Asia.

In February 1969, Mr. Rostow returned to teaching at the University of Texas at Austin, where he was a professor of economics and history. Until his death, he remained active in teaching undergraduates in the fall semesters and in teaching a graduate seminar in the spring.

He was the author of more than 30 books, the latest of which are "Theorists of Economic Growth from David Hume to the Present, With a Perspective on the Next Century "(1990), the third edition of "The Stages of Economic Growth," (1990) and "The Great Population Spike and After: Reflections on the 21st Century" (1998). Mr. Rostow's last book, "Concept and Controversy: Sixty Years of Taking Ideas to Market," will be published in June.

Survivors include his wife, Elspeth, and two children.

His brother, Eugene V. Rostow, undersecretary of state for political affairs in the Johnson administration, who also was a strong supporter of the war in Vietnam, died Nov. 25.