The country has had no effective central government since 1991, leading to a complete breakdown of law and order, and pirates operate off the coast almost with impunity.
Admiral Prazuck told French TV station La Chaine Info the pirates seemed to be surprised that the navy ship fought back.
"Once they realised they were facing a ship that was responding and was heading towards them, they stopped shooting and attempted to flee," he said.
French military spokesman on the foiled attack
"The Somme gave chase and intercepted one of the pirates' boats. All the weapons had apparently been tossed into the sea and the suspected pirates are now being held on board the Somme."
About two dozen ships from European Union nations, including Britain, France, Germany and Italy, patrol the waters off Somalia - an area of about two million square miles.
Although the international naval forces have stepped up patrols in the Gulf of Aden this year, relatively few of the pirates detained have faced trial because of the legal complexities involved.
Bookmark with:
What are these?