An attempt by ousted Burundi President Pierre Nkurunziza to return home to tackle a coup has failed and he has returned to Tanzania where he was attending a summit.
The coup d'état announced by Maj Gen Godefroid Niyombare on 13 May had brought thousands on to the streets to celebrate.
But its outcome remains unclear and the presidency insisted it had failed.
One source told AFP news agency: "Both sides are committed to finding a compromise before dawn and announcing it to the population to avoid confusion and prevent things from escalating tomorrow."
Although Nkurunziza loyalists were said to be in control of key positions such as the presidential palace and main radio station, the capital, Bujumbura, was said to be quiet.
Earlier Gen Niyombare had ordered the closure of the airport to prevent Nkurunziza's plane from landing. The deposed leader had attempted to return from the summit, but was forced back after 10 minutes in the air.
The UN and US urged all sides to show restraint.
In his earlier announcement of the coup, Gen Niyombare said he did not recognise the leadership because the president's bid for a third term violated the constitution.
Gen Niyombare said in a radio broadcast: "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."
had been in the Tanzanian capital, Dar es Salaam, to discuss his country's week-long domestic crisis with regional leaders.
Tanzanian President Jakaya Kikwete said the summit had condemned the coup, adding: "The region will not accept, nor will the region stand by, if violence does not stop or escalates in Burundi."