French commandos have carried out a helicopter raid against a group of Somali pirates soon after they released 30 hostages from a luxury French yacht.
Gen Jean-Louis Georgelin said troops moved in after the Ponant came ashore, seized six pirates and probably found part of a ransom paid by its owners.
Local officials said at least three people died in the raid, but France denied there had been any casualties.
The 850-tonne boat and its 30 crew were seized in the Gulf of Aden last Friday.
It was then moored near the port of Eyl in the northern Somali semi-autonomous Puntland region, while the pirates held negotiations with its owners, French charter company CMA-CGM.
Gen Georgelin, the chief of staff of the French armed forces, said the pirates had released the hostages without incident earlier on Friday.
Once the crew had been brought ashore safely, French attack helicopters tracked the pirates, believed to be fishermen, to the village of Jariban and moved in when they saw some of them attempting to flee the scene, the general said.
A sniper disabled the engine of the get-away car, while another helicopter dropped off three French commandos who captured six of the 12 pirates.
The pirates "gave themselves up without too much difficulty", the general said, adding that those captured would be handed over to French justice officials.
"It was an intervention, not a pulverisation," he added.
Gen Georgelin said that in the course of the operation, troops had also recovered "interesting bags" and "some of the ransom that was probably paid".
The pirates had released the hostages without incident earlier on Friday
"Naturally, absolutely no public money was paid in this affair," he added.
Somali officials and sources close to the negotiations said the owner of the yacht had paid a $2m (£1m; 1.3m euros) ransom for the crew's release.
The governor of Mudug, Abdul Kadir Ahmed, said three bodies had been recovered after the operation and that eight people had been wounded.
But French President Nicolas Sarkozy's office strongly denied that anyone was killed in the operation. President Nicolas Sarkozy earlier thanked the French military for their role in ending the crisis.
"The president expresses his deep gratitude to the French armed forces and all the state services which enabled a rapid and peaceful solution to this hostage-taking," a statement said.
France has troops in nearby Djibouti and also participates in a multi-national naval force that patrols this part of the Indian Ocean.
Somali coastal waters are among the most hazardous in the world
Somali coastal waters are known to be among the most hazardous in the world. More than 25 ships were seized there by pirates in 2007.
The threat from pirates prompted France to order its navy, in November last year, to escort two ships carrying food aid to Somalia.
In November 2005, pirates attempted to board a cruise ship carrying 600 passengers off the Somali coast.
Somalia has not had an effective central government for more than 17 years and is plagued by insecurity.