President Francois Mitterrand arrived in the troubled French Pacific territory of New Caledonia today on what was seen here as one of the most politically risky missions he has undertaken yet.

Stringent security measures were in force throughout the island, which has been under a state of emergency for the past week, as the president's plane touched down in one of the few remaining outposts of the old French empire more than 24 hours' flying time from the French mainland. Mitterrand was taken by helicopter to the capital, Noumea, for talks with local leaders immediately after his arrival.

In a television interview before leaving Paris, Mitterrand said that the purpose of his trip was to support a plan to grant New Caledonia a limited form of independence in "association" with France. The plan was proposed earlier this month by a French government delegate in an attempt to find a compromise between the rival demands of 62,000 native Kanaks and 54,000 French settlers, most of whom are descendants of families who settled on the island in the 19th century.

About 20 persons have been killed as a result of a series of clashes between the two communities during the past three months.

Political commentators in France believe that the president's surprise decision to travel to New Caledonia, which he announced only Wednesday, represents part of a strategy designed to bolster falling public support for his Socialist Party prior to parliamentary elections next year. The right-wing opposition has accused the government of preparing to "abandon" the island.

Settlers opposed to any form of independence have taken advantage of Mitterrand's visit to plaster Noumea with the red, white and blue tricolor flag of the French republic. Thousands of people who want the island to remain part of France marched through downtown Nouemea despite an official ban on all demonstrations. Motorists honked horns and waved flags from car windows.

A section of town near the official residence of the government delegate, Edgard Pisani, where Mitterrand was receiving local dignitaries, was sealed off by hundreds of gendarmes and paramilitary riot squads. The French president was scheduled to pay a helicopter visit to other parts of the island before returning to Paris this evening.

The crisis in New Caledonia has evoked memories in France of the bloody civil war in Algeria in the 1950s and 1960s, which ended with the mass exodus of French settlers known as pieds noirs and the granting of independence.

In a direct allusion to the Algerian precedent, the leftist newspaper Liberation commented that by visiting New Caledonia Mitterrand was running a similar risk to that taken by a former Socialist prime minister, Guy Mollet, when he visited Algiers in 1956. Mollet was greeted by a hail of tomatoes thrown by pieds noirs angry at concessions being made by the government to Algerian nationalists.

In Mitterrand's case, the danger of physical harm seemed slim in view of the unprecedented precautions that have been taken to protect him from unsupervised contact with the local population. France sent a further 1,000 gendarmes and police to the colony last week after riots by white settlers in Noumea and the shooting by police of two leading Kanak separatists.

The political risks, however, were much larger -- with Mitterrand apparently ready to stake his own reputation on what the government here views as a common-sense compromise to the conflicting demands of the two main communities on the island. There has even been speculation here that the president might call a referendum on the French mainland to approve the semi-independence plan he is offering New Caledonia.

Mitterrand's taste for dramatic initiatives has had mixed political consequences at home. He was admired generally for flying to Beirut in October 1983 after attacks on French and U.S. military barracks. But he was criticized for trips to meet Libya's Muammar Qaddafi and Syrian President Hafez Assad.