Somalia has pardoned three Britons caught illegally bringing more than $3m (£2m) in cash into the country to pay a ransom to Somali pirates.
The three of them, together with an American and two Kenyans, were arrested on 24 May shortly after flying into Mogadishu airport with the money.
All six, who have not been officially named, were sentenced to jail but the president has since pardoned them.
The group has left Somalia without the money which the government confiscated.
They were also told to pay $100,000 (£62,000) to get their planes released.
The Foreign Office has not commented on the pardons.
Government spokesman Abdirahman Omar Osman said: “Because of their illegal arrival, the two planes were each fined $50,000 [£31,000]. And the $3.6m in cash has been taken by the government.”
The two men accused of carrying the cash received 15-year sentences and were also fined $15,000 (£9,000) each.
The other four men – two pilots and their assistants – received 10-year sentences and fines of $10,000 (£6,000).
On Sunday however, President Sharif Sheikh Ahmed, of the interim government, pardoned all six men.
This was the first time Westerners have been sentenced for involvement in delivering ransoms.
The Somali government officially opposes the payment of ransoms but the practice has become routine. It is not clear why this group of men fell foul of the authorities.
The BBC’s East Africa correspondent Will Ross said: “Almost all the ships to have been held by Somali pirates have only been released after the payment of a hefty ransom – often several million dollars.”
He said ransoms were usually air-dropped onto hijacked ships by secretive security firms.
“One government minister said the episode was proof that westerners were fuelling the piracy off the Somali coast,” he added.
The UN says more than $110m in ransoms were paid to Somali pirates last year.