Burkina Faso said Friday it thwarted a “vast conspiracy” earlier this month by forces loyal to ousted leader Blaise Compaore, which aimed to seize power in the impoverished Sahel state.

The plot called for attacking the presidential palace and detaining “certain authorities”, said Interior Minister Simon Compaore, who is no relation to the ex-leader.

Some 30 troops from the ex-president’s security unit also planned to free comrades who were part of a failed September 2015 coup against the transitional government that took power after his fall, the minister said.

Cases against 10 soldiers have been referred to a military prosecutor and 20 are still being held for questioning.

Blaise Compaore was chased from power in October 2014 following a popular revolt after he tried to change the constitution to extend his 27-year rule.

The attempted 2015 coup was staged by troops from the presidential guard loyal to the ex-leader but was blocked by street protesters and by the army, which attacked the plotters’ barracks.

Authorities uncovered the failed plot when on October 8 military police arrested four people during a routine check, two of whom were later killed while trying to take the officers’ guns, the minister said.

Further investigation revealed all the men were ex-members of Campaore’s presidential guard and three of them were wanted over a January attack on a weapons depot.

The minister said the plotters also had a “Plan B” after their coup failed, which was to steal military weapons and “create chaos” by shooting randomly at garrisons.

Authorities have seized a Kalashnikov and six magazines full of bullets.

News of the reported coup attempt comes days after Burkina Faso authorities announced the release of Colonel Mamadou Bamba, the officer who announced the 2015 abortive coup.

“Yesterday (Tuesday), Colonel Bamba left prison. He has been granted provisional freedom,” a high-ranking military magistrate told AFP on Wednesday.

Bamba went on television to announce the coup on September 17, 2015, reading a statement saying the army had seized control from a transitional government which took office after Compaore fled to Ivory Coast.

Bamba was not a member of Compaore’s presidential guard which was behind the putsch but was jailed along with coup leader Gilbert Diendere.

In all, 85 people have been charged with organising the coup and warrants have been issues for the arrest of a further 10. Around 40 suspects have been granted temporary release.