Burundi's former prime minister Alain-Guillaume Bunyoni appeared in court on Monday accused of undermining national security and insulting the president, a judicial source and witnesses said, AFP reports. ALSO READ: Burundian Prime Minister Bunyoni sacked, replaced Bunyoni was prime minister from mid-2020 to September 2022 but was fired in a high-level political purge after President Evariste Ndayishimiye took office. A former police chief and minister of internal security, he was replaced by then interior minister Gervais Ndirakobuca, days after Ndayishimiye had warned of a coup plot against him. He was arrested last month in the city of Bujumbura on the eve of his 51st birthday. ALSO READ: Former Burundian Prime Minister Bunyoni arrested Everyone was surprised to see him arrive handcuffed, a witness told AFP on condition of anonymity, adding that he was clad in the green uniforms worn by Burundian prisoners. Pre-trial detention Monday's session held before a council chamber extended his pre-trial detention at Ngozi Prison in the north of the country, a judicial source who asked for anonymity to discuss the case told AFP. The former premier was charged on Friday before a three-judge high court in a closed session, the source added. Bunyoni is accused of undermining the internal security of the state, undermining the proper functioning of the national economy and illegal enrichment, according to court documents seen by AFP. ALSO READ: Burundian ex-premier Bunyoni goes missing He is also facing charges of illegal possession of weapons and insulting the president. Influential figure A close ally of former president Pierre Nkurunziza, Bunyoni was an influential senior figure in the ruling CNDD-FDD party. He was seen as the head of a cabal of military leaders known as the generals who wielded the true political power in Burundi and the president himself had alluded to his isolation in a 2021 speech. Ndayishimiye took power in June 2020 after Nkurunziza died of what the Burundian authorities said was heart failure amid widespread speculation he succumbed to Covid-19. He has been hailed by the international community for slowly ending years of Burundi's isolation under Nkurunziza's chaotic and bloody rule.