A court in Mali's capital Bamako ordered the temporary release of former coup leader Amadou Sanogo from detention on Tuesday, according to an AFP journalist. A former army captain, Sanogo and several other plotters had staged a military coup against President Amadou Toumani Toure in the West African country in 2012, after rebels took control of the country's north. But the junta led by Sanogo stepped aside under international pressure after critical northern cities such as Timbuktu and Gao fell to the rebels. Sanogo was then held for six years on charges of killing soldiers who opposed the putsch. The rebellion in the north has since been taken over by jihadists, who have spread violence to central Mali as well as neighbouring Burkina Faso and Niger. Malian and foreign troops have been struggling to quell the revolt, and there are calls to find a political solution to the deepening crisis. The court's decision to release Sanogo on Tuesday is expected to avert tensions that would have been provoked by his trial, which stalled after it began in 2016, but was expected to resume this month. The former army captain and 16 others first went on trial in 2016 after they were accused of abducting and killing 21 elite "Red Berets" in 2012. The "Red Berets" had been accused of involvement in a counter-coup against Sanogo and his loyalists. Their bodies were found in a mass grave in 2013. In addition to Sanogo, Mali's current defence minister -- who had been army chief of staff of the junta -- was also charged with involvement in the massacre. The court also ordered the release of twelve of Sanogo's co-detainees on Tuesday. mk-sd-lal/eml/jj