The world's newest country, a cluster of 33 coral atolls scattered across 2 million square miles of the South Pacific, came into being here today in a ceremony attended by Britain's Princess Anne.

Formerly a British colony made up largely of the Gilbert Islands, Kiribati (pronounced Kiri-BAS) officially became an independent republic at the stroke of midnight as the Union Jack was lowered and the new country's red, blue and yellow flag raised to the applause of thousands of spectators.

Most of the 10,000 people who inhabit the main island of Tarawa packed an open-air stadium to watch the ceremony, which was preceded by hours of dancing by hundreds of grass-skirted women.

The spectators, including children perched in coconut trees and atop water towers, cheered and shouted the nation's motto, "te Mauri, te Raoi, te Taboma" (good luck, peace and prosperity).

As the flag fluttered in a gentle breeze that broke the sweltering heat, fireworks burst from an Australian Navy ship anchored offshore.

Included under the new Kiribati flag are the former Gilbert and Phoenix islands, eight of the Line Islands and Ocean Island, which reverts to its original name of Banaba.

Despite the apparent enthusiasm of most of Kiribati's 55,000 citizens, the new nation is not entirely carefree.

Phosphate deposits, the country's main source of revenue, are expected to run out at the end of the year, and dissidents on the island that holds most of those deposits are fighting for self-rule.

Kiribati's 29-year-old president, Ieremia Tabai, was forced to take strict security precautions to prevent trouble during the independence celebrations.

The dissidents, from Banaba, have vowed to continue their struggle. Earlier this year they hurled gasoline bombs to disrupt mining operations on the island.

The only country in the world that straddles the International Date Line, Kiribati joins 10 other South Pacific island nations that have become independent since 1962. Last year the Solomon Islands, with a population of about 200,000, and Tuvalu, which has 8,000 residents, became independent.

The Anglo-French condominium of New Hebrides is expected to follow next year, but the French have been resisting calls by some South Pacific island nations for independence in French Polynesia and New Caledonia.

Under a treaty initialed in May by representatives of the Gilbert Islands, Britain and the United States, the British agreed to give Kiribati more than $43 million in aid over the next four years.

The United States agreed to give up its claims to several of the islands including Canton and Enderbury, which until recently were the sites of U.S. tracking stations. In return Washington was assured that American tuna fishermen plying Kiribati's waters will receive nondiscriminatory treatment. The treaty must still be ratified by the U.S. Senate.

The United States retains three islands - Kingman Reef, Palmyra and Jarvis - which belong to the Line Islands chain but were never part of the British colony. CAPTION: Map, Kiribati, By Richard Furno - The Washington Post