"We have been holding them for three months. We investigated and they confessed."
Al-Shabab aims to topple the UN-backed government in Somalia and introduce its own version of Islamic law in the country.
Courts run by al-Shabab officials have ordered executions, floggings and amputations in recent months, mostly in the southern town of Kismayo, but also in districts of the Mogadishu held by the fighters.
The group have also banned movies, mobile phone ringtones, dancing at wedding ceremonies and playing or watching soccer.
Also on Sunday, al-Shabab closed ASEP, a local non-governmental organisation, in the town of Balad Hawa, near the Kenyan border and detained several of its members, according to local residents.
An al-Shabab source told Reuters news agency that the staff had also been accused of spying.
The US has said al-Shabab is a proxy force for Osama bin Laden's al-Qaeda group in the failed Horn of Africa state.
About 19,000 civilians have been killed in fighting since the start of 2007 while another 1.5 million have been forced out of their homes.