Despite the disaster that befell the United States in Indochina, a U.S. policy of "containment" succeeded for 25 years in preventing a communist takeover of South Vietnam, says a new study on the war period.

Moreover, says the book, the process by which President Johnson and his aides reached decisions on the war in the 1960s was a showcase example of democracy in action, marked by much less blundering, self-delusion and deception than critics have maintained.

These conclusions, which the authors concede are likely to startle many, are contained in "The Irony of Vietnam: The System Worked," to be published today by the Brookings Institution.

In writing the 387-page study, authors Leslie H. Gelb and Richard K. Betts drew on recently declassified White House and Defense Department documents on the U.S. commitment to South Vietnam during the Kennedy and Johnson administrations.

Gelb, now director of politico-military affairs in the State Department, was chief of the Defense Department project that produced the Pentagon Papers, the first comprehensive official account of the U.S. role in Indochina. Betts is a former Harvard University faculty member and a research associate at Brookings.

They said that, contrary to the widely accepted belief, Johnson did not use the 1964 Gulf of Tonkin incident as an excuse to escalate U.S. involvement in Vietnam.

Although the incident was used as a rationale for congressional approval of a far-reaching war powers act, Johnson for months "kept clinging to the possibility that direct and sustained use of American force might be averted," the authors say.

Throughout that period and the two Republican administrations that followed, they say, U.S. leaders carried out policies that reflected pressures from Congress, public opinion and the news media.

In the early years when the country was generally united on the issue, they say, the policy sought to contain communism and prevent a communist victory in Vietnam, but never to achieve a U.S. military victory.

After the Tet offensive of early 1968 and the strong shift in sentiment on the war, they say, U.S. policy decisions continued to reflect that sentiment.

"The commitment in principle always determined the scale of the commitment in fact, not th ereverse," they say. "The escalation of involvement was not a blind slide down a slippery slope; it was the response to the progressive escalation of the price of keeping the commitment. The minimum necessary price always grew, but it was always paid."

Thus the image of U.S. leaders as "overly optimistic cold warriors" operating in ignorance of Vietnam and looking for an impossible victory is a false one, say the authors.

When the domestic consensus on Vietnam changed, they say, "the purpose changed and the United States decided to let Vietnam go."