Two French security advisers seized in Somalia are to be tried under Sharia law.
The al-Shabab militia said they would be tried for spying and "conspiracy against Islam".
The two, who were training government troops, were kidnapped by gunmen in a hotel in Mogadishu on Tuesday and later handed over to al-Shabab.
The BBC reports Al-Shabab and its allies control much of southern Somalia.
No date has been set for the trial of the two men who were on an official mission to train the forces of the interim government.
Somalia has not had a functioning national government since 1991.
Separately, three foreign aid workers were also reported kidnapped on Friday night in a Kenyan town close to the Somali border.
Their nationalities and the organisation for which they worked were not immediately known.
Foreigners are regularly kidnapped in Somalia and usually freed in return for a ransom. Journalists and aid workers are particularly targeted.