A French assault team today stormed a cave in this French Pacific territory and freed 22 gendarmes and a prosecutor held hostage by Melanesian separatists. An official said 17 people were killed. Bernard Pons, minister for overseas territories in the conservative government of Premier Jacques Chirac of France, said the dead included two members of the assault team and 15 kidnappers. He also said two members of the assault team were seriously injured. Pons said the hostages were freed after ``a particularly violent battle'' in the nearly seven-hour assault on a network of caves in Ouvea, an island off the northeast coast of New Caledonia. The assault team attacked the cave with tear gas, forcing most of the approximately 30 kidnappers out, Pons told a news conference after returning from Ouvea, where he had traveled for the operation. The hostages freed themselves from their handcuffs before the attack after a key was smuggled to them by Capt. Philippe Legorjus, chief of an anti-terrorism squad. Legorjus had been captured during earlier hostage negotiations with the separatists, then freed to act as an go-between with French authorities. Legorjus made several trips to and from the caves during negotiations and was told that the hostages would be killed if he did not return. Legorjus also smuggled to the caves two pistols with which hostages defended themselves during the attack. ``Profiting from the smoke created by tear gas bombs, the hostages were able to escape through a chimney in the back of the cave,'' Pons said. Police said the injured were taken to a hospital in Noumea, capital of this island territory 1,300 miles northeast of Australia. In Paris, Defense Minister Andre Giraud said in a television interview that the kidnappers' chief was among those killed. Giraud told French radio that the attack was ordered by Chirac, with approval from President Francois Mitterrand, when negotiations with the kidnappers stalled. ``The situation inside the cave had become extremely dangerous,'' Giraud said. ``In any case, it was entirely intolerable that representatives of the forces of order might be held hostage.'' Jean-Marie Tjibaou, president of the Kanak Socialist National Liberation Front, the main Melanesian separatist organization, said the operation was ``a hard blow for the Kanak people.'' ``This will not stop the determination of the Kanak people in their demand for independence,'' Tjibaou told The Associated Press by telephone from his home in Hienghene at the northern end of New Caledonia. Asked if he expected to be arrested, Tjibaou replied: ``It's always possible. It would be completely logical, since the government thinks there is no political claim but only a terrorist band.'' Authorities had imposed a near total news blackout for several days, cut communications with Ouvea and would not allow journalists to go there. The Melanesian kidnappers had demanded negotiations toward independence for New Caledonia, the French Pacific island territory. Fifteen of the gendarmes had been held since they were kidnapped from a police station on Ouvea April 22. Four gendarmes were killed in that attack. Legorjus and seven other hostages were seized April 27 as they sought to negotiate the release of the other hostages. The militants were demanding that French troops be removed from Ouvea and that a mediator be sent to arrange a referendum on independence for New Caledonia, a French territory since 1853. They also had demanded the cancellation of elections, which took place during scattered violence April 24. As a result of that election, Mitterrand and Chirac will face each other in a presidential runoff election in France on Sunday. New Caledonia has become an issue in the campaign. Of New Caledonia's 145,000 inhabitants, 43 percent are native Melanesian, known as Kanaks, most of whom desire independence. European settlers make up 36 percent of the population, with the rest Asian and Polynesian. This group generally would prefer to remain part of France.