Communist Vietnam is set to become the seventh member of Asean today, overcoming a last-minute dispute over free trade.

The Vietnamese flag is to be hoisted at a ceremony in Brunei's capital today in a ceremony that has been carefully rehearsed all week.The six current members of the Association of Southeast Asian Nations - Brunei, Indonesia, Malaysia, the Philippines, Singapore and Thailand - will all give welcoming speeches.

What was clearly not in the script was a last-minute diplomatic wrangle over the terms of Vietnam's participation in an Asean Free-Trade Area (AFTA), perhaps the group's main focus now that the long civil war in Cambodia has been settled.

Diplomats said Vietnam's admission was nearly derailed last week when Hanoi told the group it would be unable to sign the AFTA pact because it had not been ratified by its National Assembly.

Asean officials were said to be livid. It was finally agreed that Vietnam would begin participating in AFTA - which seeks to cut tariffs to a maximum 5 percent over the next eight years - on January 1, 1996. Vietnam also got an extension of three years, to 2006, to cut tariffs.

Vietnam's admission will mean a fundamental adjustment for Asean, founded 28 years ago amid the fears and tensions of the Cold War and at the height of the war in Indochina.

It was just six years ago that Thailand was exchanging artillery fire with Vietnamese occupation troops in Cambodia. Asean's primary focus then was to get Vietnam to withdraw from Cambodia and end the civil war there.

Asean was the driving force behind the 1991 Paris peace agreement ending the Cambodian civil war, which remains its greatest achievement. After

Vietnam's admission ceremony, Cambodia is expected to get official Asean observer status.

Joining the group also is expected to help Vietnam in its dispute with China over the Spratlys, a string of islands, reefs and atolls in the South China Sea.

The potentially oil-rich Spratlys are claimed wholly or in part by

Vietnam, China, the Philippines, Taiwan, Brunei and Malaysia.

"You don't have to look far to see why Vietnam is joining Asean," said a Western diplomat in Hanoi last week. "Just look at what lies over their northern border."