On a grassy hilltop in this remote area of northern New Caledonia the only sounds came from a ramshackle church with crumbling cement walls and a tin roof. Inside lay 10 coffins draped with the flag of Kanaky, the independent state that native Kanak, or Melanesian, militants hope to create in this French island territory. Hunched over the caskets were Kanak women, wailing and keening for their slain menfolk.

As a crowd of mourners stood outside, tribesmen stripped to the waist worked with picks and shovels to finish digging 10 narrowly spaced graves for Kanak militants killed Wednesday night in what Kanaks say was an ambush by opponents of independence.

The funeral ceremony Saturday at this site about 18 miles inland by a muddy mountain road drew about 1,000 people -- most of them black Kanaks from the Tiendanite region and various parts of New Caledonia. While the women came in colorful "missionary gowns" and carried flowers, a number of the men wore fatigue jackets or other military-style garb, and a few had shirts with the likeness of Ernesto Che Guevara on the back.

Before the burial was over and evening mist enveloped the area's jungled hills, the Kanaks listened to angry speeches by their leaders. The killings were the result of French colonialism, the mourners were told. The 10 did not die in vain, but for the independence of Kanaky. They were not the first and would not be the last. The struggle would continue.

Emotional speeches were also delivered the day before in the New Caledonian capital, Noumea. But on this occasion, although the main speaker was a Kanak, the crowd of about 12,000 was mostly of conservative white European settlers, and the message was a show of strength by opponents of independence for this South Pacific territory.

The keynote speaker, Dick Ukeiwe, the president of the New Caledonian territorial government who was being welcomed back from a visit to France, drew wild applause when he said he told French Socialist President Francois Mitterrand, "We want to remain French and stay in the republic."

A political conservative who has refused to negotiate with independence-seeking Kanak militants, Ukeiwe avowed that his Kanak race "will not betray you" and concluded with shouts of "Long live French New Caledonia" and "Long Live France."

The crowd then sang the French national anthem, The Marseillaise, as sailboats skimmed across the azure sea and French tricolors whipped in the breeze from modern white buildings set among crimson flame trees and violet bougainvillea.

The two ceremonies symbolized a growing racial and political polarization in New Caledonia, a multiracial French overseas territory of about 145,000 people that many of residents consider paradise. The inhabitants include nearly 62,000 native Kanaks, who make up the largest single ethnic group but who are outnumbered by a settler population of about 54,000 Europeans and 29,000 Polynesians, Asians and members of other races.

At least 12 persons have been killed and hundreds of homes burned, looted or evacuated in conflict that erupted before elections last month for a territorial assembly.

[Seven fugitives sought in connection with the murders Dec. 5 of 10 Kanak militants have given themselves up following the arrest Monday of a key suspect, Maurice Mitride, authorities said Wednesday in Noumea. Members of the group were described as metis, or persons of mixed race, except for one said to be a Kanak.]

The vote for the assembly was boycotted by militant Kanaks on grounds that it only perpetuated French colonialism, and a conservative neo-Gaullist party, the Rally for Caledonia in the Republic, emerged in control of the autonomous territorial government.

The conflict reflects racial differences between the Kanaks and the European settlers and political collisions between leftists and rightists here and in France. It also draws on economic dichotomies between the French-style capital and the underdeveloped countryside where most Kanaks live, cultural differences between the native tribal societies and the highly individualistic Europeans, and elements of a delayed Third World revolutionary sentiment inspired by past independence struggles against colonial powers.

Yet the diverse New Caledonian population also has a good deal in common. At both the pro-independence funeral and the anti-independence rally, the speeches were in French, which is spoken by nearly everyone in the 131-year-old French possession. And while the independence seekers did not sing the Marseillaise, they did conclude the service with a Roman Catholic hymn -- in Latin.

Militant graffiti on many walls in Noumea denote some trouble in paradise, but Kanaks, French settlers and various other racial groups seem to mix fairly easily. The capital looks much like a town on the French Riviera, from the bare breasted sunbathers to the shops selling French bread, wines and cheeses, to the busy cafes and surly waiters.

That the territory's troubles should have erupted now is considered largely a product of political factors 12,000 miles away in the metropole, as the French mainland is called. A referendum on self-determination has been scheduled here for 1989, allowing New Caledonian voters to choose among the status quo, expanded autonomy and independence. But Kanak militants reportedly fear that, by then, the Socialist government in Paris will have been turned out by less sympathetic conservatives who would block any move for independence.

As a result of the independence-seeking militants' campaign of violent agitation, a French special envoy, Edgard Pisani, has been sent as the new high commissioner to negotiate with all political forces and make proposals within two months for an act of self-determination to solve the conflict.

A main obstacle is that the leading militant organization, the Kanak Socialist National Liberation Front under Jean-Marie Tjibaou, insists that only Kanaks should vote in any independence referendum and plans to continue its struggle anyway if the vote is to stay with France.

There is vast disagreement over how much support -- and fire power -- the independentistes actually have. The local government maintains that only 400 to 500 Kanak militants armed with shotguns and hunting rifles are "terrorizing" Europeans and Kanaks alike in the countryside and that most Kanaks want to remain French.

A western diplomat in Noumea says his best estimate is that 70 to 75 percent of the Kanak population favors independence, but that since the natives now are a minority in their own homeland, "it is fairly obvious that if there were a vote tomorrow by everyone, it would go against independence."

The militants' numbers may not be large, this diplomat says, but since there are "many more Kanaks in the bush than Europeans," he adds, "it is certainly within the scope" of the Kanak Socialist National Liberation Front "to make the interior very insecure."

Already about 400 people, mostly European settlers, have been evacuated from tense rural areas by French military aircraft to Noumea, where about half of the population lives. Most of these residents are French settlers, and the influx further exacerbates the disparities between the capital and countryside.

If New Caledonia eventually turns into a late gasp of French colonialism and revolution does come, it may be the first one waged within surfing distance of a Club Mediterranee, one of the French resorts that offer exotic holiday settings.

While tourism has dropped off lately in the wake of travel warnings by the Australian and New Zealand governments, New Caledonians of all colors continue to go to the superb beaches around Noumea, many of the women bathing topless in attire that French wags long ago dubbed the "monokini."

One blond 18-year-old nursing student, only the merest suggestion of a bikini bottom separating her from a total tan, expressed as her main concern the inflated cost of movies and night clubs. But she also had some harsh words for the Kanaks.

"We give them everything and this is the thanks we get," she said, referring to the pro-independence agitation. "They don't have to work, and they get free medical care. But they are very primitive. Some are just beasts."

In fact, as a visit to this tribal area shows, the Kanaks appear far less primitive than, for example, the aborigines in Australia. What Europeans may call primitive is, to the Kanaks, a communal way of life stressing attachment to land and a simple life.

Yet diplomats say it also is true that, whether the Kanaks want to or not, they live largely outside New Caledonia's economic mainstream. According to government figures, three out of five are unemployed, and most of the rest are farmers or fishermen who live in their tribal areas in tin shacks and get by on about $30 a month.

This is in a territory with the region's highest per capita income. New Caledonia is the third largest nickel producer after Canada and the Soviet Union. It receives about $210 million a year from Paris.

Many Kanaks undoubtedly are satisfied with their traditional way of life. But those who are not worry many of the rural French settlers.

"The black people here are so kind and sweet," said one of the few French settlers who has not yet evacuated the area of Hienghene. "It's a pity that their leaders are pushing them. How can you imagine natives happier than they are here?" he asked, waving at the lush countryside inland to the west and the beach nearby. "It's just a question of people wanting to be more than what they are."

Whatever their motives, several Kanaks two weeks ago tried to set fire to the settler's house but were driven off by dogs before much burned. The reason for the troubles, the settler said, was that many young Kanaks go to France and get involved in politics. He said 17 recently were invited to Libya.

"Now they know what is a Molotov cocktail," the settler said. "Before, nobody knew what it was." According to government figures, half of the Kanak population is less than 20 years old.

It seems clear that the New Caledonian issue is taking on a larger dimension, at least in the minds of some French settlers, and that many are determined to stay in a land they, too, consider their own.

Jacques Lafleur, a representative from New Caledonia in the French National Assembly, said the Kanak Socialist National Liberation Front had "fallen into a trap."

"This is no longer a problem of New Caledonia," he said. "It is a problem between East and West."