(Adds quotes, background, byline) By Patrick Nduwimana BUJUMBURA, Jan 15 (Reuters) - A Burundian court on Monday acquitted former president Domitien Ndayizeye and four others of charges they plotted a coup in the tiny central African country in a case that has drawn widespread rights criticism. But the ruling said two remaining defendants, a former rebel leader and a civilian, would have to serve jail terms over a conspiracy to kill President Pierre Nkurunziza and overthrow his government. The court said Ndayizeye, former vice president Alphone-Marie Kadege, lawyer Isidore Ruyikiri, the leader of a small ethnic Tutsi party Deo Niyonzima and army officer Damien Ndarisigaranye were acquitted. "They were charged on the basis on one person's account but this is not enough for them to be found guilty so the court has ruled the charges ... void," Elie Ntungwanayo, secretary-general of Burundi's High Court, told reporters. Former rebel leader Alain Mugabarabona, whom the prosecution accused of being the mastermind of the plot, will have to serve 20 years in jail. Co-defendant Tharcisse Ndayishimiye, who had the told the court he attended meetings with the others, was sentenced to 15 years in prison. "For the last two, the court recognised that they had confessed in front of police and the prosecution," Ntungwanayo said. Mugabarabona has denied the allegations, saying he was forced to implicate others under torture. Police arrested former President Domitien Ndayizeye, who led Burundi's transitional government from April 2003 until Nkurunziza's election victory in August 2005, and six others in August saying they had evidence they were plotting a coup. Critics said the plot was invented by the ruling party to quash dissent but the government and prosecutors denied this. Diplomats have criticised Burundi's government, under pressure over its record on democracy and freedom of expression, for its handling of the alleged plot and some feared it could destabilise the nation emerging from years of war. Kadege's lawyer Francois Nyamoya welcomed his client's acquittal. "We are very happy. Justice has been done," he told Reuters. Ndayizeye was the last president in an interim government that was in place under a U.N.-backed peace plan culminated in elections in 2005 to help end a brutal civil war. About 300,000 people were killed in Burundi's 12-year conflict that pitted rebels from the Hutu majority against the minority Tutsi elite.