The European Court of Human Rights says France violated the rights of Somali pirates who had attacked French ships and has ordered compensation for them over judicial delays.
The nine Somali pirates should get thousands of euros because they were not immediately brought before a French judge, the court ruled.
One is to get 9,000 euros (£7,000) and the others sums of up to 7,000 euros.
The judges faulted France for keeping them in custody for an extra 48 hours.
The pirates had held French citizens hostage after seizing a French-flagged cruise ship and a French yacht in 2008.
The French military captured the pirates on the Somali coast in two operations, after the hostages had been released for ransoms of $2.1m (£1.3m) and $2m.
Indian Ocean shipping has been plagued by pirate gangs operating off Somalia in recent years, but international naval action in the region has sharply reduced the attacks.
Before transferring the pirates to France, the authorities held one group for four days and the others for six days and 16 hours.
But the extra 48 hours of custody on French soil violated the pirates' right to liberty and security under the European Convention on Human Rights, the court ruled.
The convention's Article 5.3 "was not designed to give the authorities the opportunity to intensify their investigations for the purpose of bringing formal charges against the suspects", a court statement said.
The judges argued that the time between their arrest and transfer to France was already enough for France to draw up charges, instead of delaying for another 48 hours.
Court judgements are binding on signatories to the convention.
The judges did not challenge France's right to arrest the pirates inside Somali territory, under UN anti-piracy rules.