Somalia has released without charge a former minister and fierce critic of the government who spent two days in jail after being arrested for alleged treason, a lawmaker told Reuters on Thursday.

The arrest of Abdirahman Abdishakur, who was a candidate in a February election won by President Mohamed Abdullahi Mohamed, followed mounting pressure on the president and his UN-backed government to end an Islamist insurgency.

"Last night at midnight, they released ex-minister Abdirahman Abdishakur," lawmaker Mahad Salad told Reuters.

The MP said he, other colleagues and the ex-minister were going to court on Thursday to "know the evidence on what he (Abdishakur) was first arrested".

Last night at midnight, they released ex-minister Abdirahman Abdishakur

Islamist militants al Shabaab have been escalating pressure on Mohamed's government by staging frequent and increasingly large-scale bombings against both civilian and military targets in recent months in the capital Mogadishu and elsewhere.

The group is fighting to expel African Union peacekeeping force AMISOM from the Horn of African nation, topple the federal government and impose rule based on its strict interpretation of Islam's sharia law.

More than 500 people were killed in twin bomb blasts in Mogadishu in October while this month a suicide bomber killed at least 18 people at a Mogadishu police academy.

At a news conference after his arrest, Somalia's attorney general Ahmed Ali Dahir had described Abdishakur's house as a hub for the opposition and a gathering point for people "who want to collapse the government".

his house was a hub for the opposition and a gathering point for people who want to collapse the government- Attorney General Ahmed Ali Dahir [on Abdishakur's arrest]

Somalia has been locked in lawlessness and violence since the early 1990s, following the ouster of dictator Mohamed Siad Barre.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.