MOGADISHU (Reuters) - A court in Somalia on Thursday released without charge a former minister and government critic who spent two days in jail after being arrested for alleged treason, an arrest which ignited a smoldering political crisis for the fragile government.

Abdirahman Abdishakur was released after the attorney general, who had ordered his arrest, had failed to bring evidence against him, Judge Aweys Sheikh Abdullahi told a courtroom.

He was released at midnight after reconciliation efforts between the government and traditional leaders before Thursday’s court ruling, Information Minister Abdirahman Omar Osman said.

Somali attorney general Ahmed Ali Dahir said he planned to appeal the ruling and criticized the court for not granting him five extra days to investigate as he had requested.

“The case is in its first phase,” he told reporters. “The attorney general’s office was not given the investigation period it asked for.”

Earlier this week, Dahir had described Abdishakur’s house as a hub for the opposition and a gathering point for people who wanted to replace the government.

The arrest of Abdishakur, who ran in the February election won by President Mohamed Abdullahi Mohamed, followed mounting pressure on the president and his U.N.-backed government to end an Islamist insurgency.

On Wednesday, some Somali lawmakers said they planned to impeach the president. [L4N1OK3Z0] Parliament adjourned last week until the end of February, but some legislators want it to reconvene on an emergency basis, lawmaker Mahad Salad told Reuters.

The political turmoil endangers fragile gains against the Islamist al Shabaab insurgency.

Islamist militants al Shabaab have been stepping up 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 Somalia, 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.

Early on Thursday, al Shabaab militants ambushed three vehicles belonging to the military’s U.S.-trained special forces unit Danab on a road between Mogadishu and the town of Wanlaweyn.

The group said it seized the three cars while residents said they saw two burning cars.

Police Major Ahmed Nur told Reuters al Shabaab had targeted the convoy with a roadside bomb before ambushing it.

“We sent reinforcement to the area but we believe many died from both sides,” he said.

“We ambushed the so-called military commandos and took their pickups,” Abdiasis Abu Musab, al Shabaab’s military operation spokesman, said.

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