A Burundi army general says President Pierre Nkurunziza has been “overthrown” amid unrest over his bid to be re-elected for a third term.
Major General Godefroid Niyombare said a salvation committee had been set up, but the outcome of the coup is unclear.
Thousands protesting against the president in the capital, Bujumbura, are now reported to be celebrating.
President Nkurunziza is currently in Tanzania. The presidency’s Twitter site said the coup attempt had failed.
Mr Nkurunziza has been meeting other East African leaders to discuss the crisis.
The Burundi presidency at first said the situation was under control and that there was no coup, then that the attempted coup had failed.
Presidential spokesman Willy Nyamitwe told the BBC that forces loyal to Mr Nkurunziza were “in full control” and that Gen Niyombare and his allies were being sought.
Bujumbura says thousands of protesters marched to the city centre alongside soldiers and two tanks after the coup was announced.
Police shot at the soldiers and the crowd. At least two protesters were killed.
The protesters continued to march, one telling the BBC this was a victory after weeks of protests.
They reached the offices of the state broadcaster which was still in the control of soldiers loyal to the president.
There are some reports that forces supporting the coup are now trying to enter the building and are meeting resistance.
Other reports say those loyal to the president and those supporting the coup are now in negotiations.
A news reporter in the capital say that protesters have broken into the national jail and have released detained demonstrators, before burning down the building.
One eyewitness in Bujumbura said that Southern Africa correspondent Karen Allen that in some outlying districts, protesters were being held up at checkpoints and prevented from moving into the city by security forces, but the mood was said to be largely celebratory.
All international flights into and out of Bujumbura are currently cancelled.
Gen Niyombare, in a statement read to reporters in a military base, said he did not recognise the leadership because the president’s bid for a third term violated the constitution.
In a radio broadcast on a private station, Gen Niyombare said: “The masses have decided to take into their own hands the destiny of the nation to remedy this unconstitutional environment into which Burundi has been plunged.
“The masses vigorously and tenaciously reject President Nkurunziza’s third-term mandate… President Pierre Nkurunziza has been relieved of his duties. The government is overthrown.”
Gen Niyombare’s “national salvation committee” comprises at least five other army and police generals.
He said in the radio broadcast that the mission of the body was the “restoration of national unity… and the resumption of the electoral process in a peaceful and fair environment”.
The unrest began on 26 April and has led to the deaths of more than 20 people.
Tens of thousands of Burundians have fled to neighbouring states in recent weeks.
President Nkurunziza has rejected calls to postpone next month’s election.
The 51-year-old former rebel leader argues that he is entitled to run for a third term because he was first appointed to the role by parliament in 2005.
The constitution states a president should govern only for two terms, but earlier this month a court upheld Mr Nkurunziza’s interpretation.