Ellsworth Bunker, a former ambassador to South Vietnam who died Thursday in a hospital in Brattleboro, Vt., at the age of 90, may have handled more varied difficult assignments in his diplomatic career of more than a quarter century than any other American.

Mr. Bunker, who had been admitted to the hospital Sept. 13 for treatment of a viral infection, served as an ambassador under every president from Harry S Truman to Jimmy Carter, and he spent 36 years in the sugar business before his first diplomatic appointment.

Among his assignments were:

*Negotiation of the controversial Panama Canal Treaty, signed in 1978.

*Service as ambassador to South Vietnam, from 1967 to 1973 -- from the beginning of the intensified American military action there until after the last U.S. combat troops withdrew.

*The Dominican Republic, in the mid-1960s, when as ambassador to the Organization of American States, he was instrumental in ending a civil war.

*The Middle East, where in 1963, he worked out a disengagement between Saudi Arabia and Egypt, both of which had intervened in the Yemeni civil war.

*New Guinea in 1962, when he successfully mediated for the United Nations a confrontation between Indonesia and the Netherlands over West Irian.

*India from 1957 to 1961, when American policy "tilted" toward India's rival, Pakistan.

*Italy in 1952, a time of domestic political turmoil.

*Argentina in 1951 to 1952, his first post, when Juan Domingo Peron and his first wife, Eva, held power.

Mr. Bunker's "keen intelligence, patience, superb negotiating skill, judgment, dedication and modesty were know to diplomats and rulers around the world," Secretary of State George Shultz said in a statement yesterday. "He scored remarkable achievements that have few parallels in American history."

The Panama Canal Treaty may have been his most difficult diplomatic task. He first became involved with Panama in 1964 while ambassador to the OAS after the Canal Zone riots. Out of these incidents came discussions of new canal treaties. In 1967, they were agreed upon and initialed, but Panamanian Gen. Omar Torrijos repudiated them. During succeeding years, there were other lengthy discussions but final agreement was not reached until April 1978.

He was appointed ambassador to South Vietnam by President Lyndon B. Johnson in April 1967, when he was a month short of his 73rd birthday. During his tenure -- he served longer in South Vietnam than any other senior American -- the war escalated, U.S. military involvement reached 543,000 men and battle deaths reached more than 46,000.

In the United States, hundreds of thousands, young and old, demonstrated against the war. In Saigon, Mr. Bunker continued to carry out his instructions from Washington, supporting a policy that was to be proven fruitless.

He told an interviewer in 1978 that he knew the policy was unworkable: "To try to fight a limited war for limited objectives with limited resources, and, by inference, limited in time, because we are an impatient people . . . this was not a viable policy."

Mr. Bunker received praise and criticism for his work in South Vietnam. He was calm and steady, but his critics said he was too distant from what was going on in the country, and depended too much on information from senior military and diplomatic officials.

A few months before Mr. Bunker was appointed ambassador to South Vietnam, he married Caroline Clendenning Laise, a career foreign service officer, in Katmandu, Nepal, where she was U.S. ambassador. His first wife, the former Harriet Allen Butler, whom he married in 1920, died in 1964.

Outwardly Mr. Bunker was almost icily cool -- the Vietnamese called him "the icebox" -- but beneath the layers of diplomatic veneer, friends said, was a warm, friendly, and sometimes angry and emotional man. One friend said he had a sense of duty that made it impossible for him to refuse difficult assignments.

He was born in Yonkers, N.Y., on May 11, 1894 and graduated from Yale in 1916.

After college, he went to work on the New York docks for the National Sugar Refining Co., of which his father was a founder. He stayed 13 years in the operations end of the business in Latin America and in the United States and became president of the company in 1940.

During World War II, he was chairman of the Cane Sugar Refiners War Committee, a government advisory body. In 1948, he was elected board chairman of National Sugar.

In 1951 President Truman appointed Mr. Bunker as ambassador to Argentina and a new career began. Relations with the Peron regime were poor. Shortly after Mr. Bunker left Buenos Aires in 1952 to become ambassador to Italy, a newspaper editorial said he "set Argentine-American relations in correct focus for the first time in years."

In Italy, where he served for 11 months, he again was editorially praised for "doing a remarkably fine job."

In November 1953, Mr. Bunker became the first salaried president of the American Red Cross. He resigned this post in 1956 to become ambassador to India. This was a period when India's nonalignment was unpopular in official American circles, and Secretary of State John Foster Dulles' cold war policies unpopular in India. During Mr. Bunker's tenure, relations greatly improved.

After returning to this country from India in 1961, he lived in Dummerston, Vt., on a farm he had acquired in 1929. Early in 1962, United Nations Secretary General U Thant asked Mr. Bunker to mediate the dispute between the Netherlands and Indonesia over West Irian.

Indonesia had claimed that territory after it won its independence from the Dutch. When the Netherlands refused to recognize the claim, the Indonesian government began expropriating Dutch property. After months of negotiations, Mr. Bunker solved the impasse. In May 1963, the territory was ceded to Indonesia.

Later in 1963, Mr. Bunker became a consultant to Secretary of State Dean Rusk and was called upon to mediate a dispute between Egypt and Saudi Arabia over Yemen. He traveled between Cairo and Riyadh, meeting with Egyptian President Gamal Abdul Nasser four times and with Arabia's King Saud six times.

Nasser withdrew 28,000 troops who had been supporting the rebels, and Saud stopped sending weapons to the royalists. Fighting, however, was to continue for several more years.

In January 1964, Johnson appointed Mr. Bunker ambassador to the OAS. In Panama there were riots protesting American control of the Canal Zone, and Mr. Bunker subsequently began the talks that 14 years later -- with the help of Sol Linowitz -- resulted in the renegotiated treaty.

The Dominican Republic was Mr. Bunker's next assignment. Civil war broke out there in April 1965 and Johnson sent in the Marines. An "inter-American peace force" was formed and Mr. Bunker stayed in Santo Domingo for nearly a year to negotiate a settlement that resulted in new elections.

After leaving the government, Mr. Bunker returned to his Vermont farm, kept an apartment in Washington, and traveled.

Mr. Bunker was the first person to receive two Medals of Freedom with Distinction, one in 1963 and the other five years later.

In addition to his wife, Mr. Bunker's survivors include three children by his first wife, Ellen Gentil, and John B. and Samuel E. Bunker.