Rival military groups battled for control of the Burundi capital on Thursday after a former intelligence chief staged an attempted coup against President Pierre Nkurunziza.

The efforts to overthrow Nkurunziza, who has sparked widespread unrest by trying to run for a third term, met with heavy armed opposition from military loyal to the president, with a deputy leader of the coup eventually saying it had failed. The president, in Tanzania when the uprising was launched, was said to have returned to the country.

Heavy gunfire rang out from the direction of the ruling CNDD-FDD party headquarters in Bujumbura, which witnesses said were being guarded by police. At times it was difficult to determine who was in control of the city, with periods of relative calm broken by bouts of gunfire in the evening. Five soldiers were reportedly killed in clashes.

Late in the day a deputy leader of the coup, General Cyrille Ndayirukiye, told the Agence France-Presse news agency: “Personally I recognise that our movement has failed”.

“We were faced with an overpowering military determination to support the system in power,” he said.

Power struggle in Burundi - the Guardian briefing

Read more

Burundi has been a tinderbox since Major General Godefroid Niyombare, a former intelligence chief who was fired three months ago, announced that Nkurunziza had been ousted after weeks of civil unrest triggered by the president’s attempt to stand for a third term.

Early on Thursday the army chief of staff, General Prime Niyongabo, announced on state radio that he did not support the attempted coup – a signal that not all of the military forces were aligned. Niyongabo said he had negotiated with those supporting the coup but if they “did not understand talking we will make them understand by force”.

There were reports that Nkurunziza had returned to Burundi from Tanzania. A text message from the presidency said: “President Nkurunziza is back in Burundi after the attempted coup. He congratulates the army, the police and the Burundian people.”

The rival factions struggled throughout Thursday for control of public and private radio stations. In the afternoon Nkurunziza announced on state radio, from an unknown location, that he condemned the coup, while thanking the soldiers who had remained loyal. “I condemn that group of coup plotters. I thank soldiers who are putting things in order, and I forgive any soldier who decides to surrender,” Reuters reported him as saying.

Heavy fighting flared around the state broadcasting headquarters, forcing radio transmissions to halt briefly. They resumed after the shooting eased to announce that state radio was still in the hands of forces loyal to the president. The state broadcaster is seen as a strategic asset for both sides to reach the population.

Earlier the African Public Radio station, which was shut down during the weeks of protests and reopened after the coup attempt, was set alight and prevented from broadcasting. Heavy plumes of smoke rose from the building. Radio Bonesha, another private station, was also attacked by people with grenades and gunfire. Burundi’s international airport, meanwhile, was shut then reportedly reopened and taken over by party loyalists.

“President Pierre Nkurunziza is now in Burundi,” the president’s senior communications adviser, Willy Nyamitwe, told AFP on Thursday night. “That’s all we can say for now because of security reasons.”

While the president’s return could not be independently verified, AFP reported that a source close to the head of state had said he “will sleep in Ngozi in his home province tonight”.

The violence leaves the country facing its biggest crisis since the end of a 12-year ethnically charged civil war in 2006. Hundreds of thousands of people died in the conflict and the subsequent peace accord ensured that the future army would be split 50-50 between minority Tutsis and majority Hutus.

Gunfire is heard on Thursday morning in the Burundian capital of Bujumbura.

Nkurunziza, a former rebel leader from the Hutu majority and a born-again Christian, believes he ascended to the presidency in 2005 with divine backing. Opposition and rights groups say it is unconstitutional for him to run for more than two terms. The president, however, argues his first term did not count as he was elected by parliament, not directly by the people. This was supported by the constitutional court, although one of the judges fled the country, claiming its members received death threats.

More than 22 people have been killed and scores wounded since late April, when Burundi’s ruling CNDD-FDD party nominated Nkurunziza to stand for re-election in polls scheduled for 26 June. More than 50,000 Burundians have fled the violence to Rwanda and other neighbouring countries in recent weeks, with the UN preparing for thousands more refugees.

Dr Robert Besseling, principal Africa analyst at the London-based risk consultancy IHS, said: “While it is too early to confirm that the coup attempt has been successful, factional fighting between rival ethnic groups in the military and police is likely to erupt and increase the probability of a civil war. The highest risk of ethnic fighting over the next few days will be in Bujumbura, overpopulated rural areas and internally displaced people’s camps along the Democratic Republic of the Congo and Tanzanian borders.

“The Imbonerakure, a youth militia affiliated to the CNDD-FDD, is likely to be deployed against ethnic Tutsi and to stage targeted political assassinations of Tutsi leaders and attacks on Tutsi groups. Retaliatory attacks by ethnic Tutsi are likely against government buildings and CNDD-FDD assets and supporters. Expatriates or foreign assets are less likely targets.”

Everything we fought for was a lie, says ex-soldier protesting in Burundi

Read more

The downtown streets, flooded on Wednesday by those celebrating the announcement of a military coup, were deserted on Thursday, except for an occasional passerby. Shops were closed, petrol stations sat empty, as most civilians stayed at home.

Burundians were fearful of what the night would bring. “I’m afraid the police will come back here at night to kill people. I don’t know who is in control here, or who is protecting us, I’m scared,” said Ngugusony Buyenzi, from a neighbourhood near the ruling party’s headquarters.