Ouagadougou - Burkina Faso's army, politicians and civil society leaders agreed to a one-year political transition with elections in November 2015 following highly charged crisis talks on Wednesday.
The talks, mediated by three west African presidents and also attended by religious and tribal chiefs, failed to name a new leader to head the transitional government.
But a statement after the meeting said all parties had agreed that an "eminent civilian personality" should take the job.
Ghana's President John Dramani Mahama, who mediated alongside his Nigerian counterpart Goodluck Jonathan and Senegal's President Macky Sall, said he was not concerned about the failure to agree on a unity leader at this stage.
"I believe that... in days rather than weeks, we'll be able to achieve an agreement and install a transitional government," he said.
"Our intention was not to take names back to the Ecowas summit," he added, referring to an emergency meeting of African leaders due to be held in Accra on Thursday.
"It's a decision for the people of Burkina Faso. They must be the ones to decide. Pain is still fresh in people's mind."
The trio of presidents had travelled to Ouagadougou to press for the swift return of civilian rule after the military appointed one of its own, Lieutenant-Colonel Isaac Zida, to run the country following last week's ouster of president Blaise Compaore.
In scenes compared to the Arab Spring, Compaore was forced to flee the country after tens of thousands took to the streets and set parliament ablaze in violent protests against efforts to extend his 27-year rule.
A rocky start
The talks did not start well on Wednesday, with opposition leaders storming out in protest over the possible involvement of Compaore loyalists in any provisional government.
"We haven't even buried our dead yet and they are putting arrogant people back in office who held the people in contempt," said Luc Marius Ibriga, spokesperson for the civil society groups, as their representatives left the room.
Security guards had to intervene as emotions ran high.
"We do not want to talk with the old governing party. They represent Blaise Compaore," said Rose-Marie Compaore, parliamentary leader of the main opposition group, the Union for Progress and Change.
Both groups were persuaded to return to the negotiations, only for members of the ruling party to then refuse to sit with them.
The opposition's main leader Zephirin Diabre objected to a proposal by the west African leaders that each group submit three candidates for a transition government.
It is a "question of sovereignty", said Diabre.
Tensions were already running high after the military arrested pro-Compaore politician Assimi Kouanda on Tuesday night for calling for demonstrations in support of the deposed ruler.
But the final deal was welcomed by all sides, including the current interim leader, Zida.
"The meeting went very well," he said, adding that he hoped the teams would be able to "find a solution in order to achieve a civilian transition".
There has been mounting international pressure on Zida and the military to return the country to civilian rule, with the African Union threatening sanctions and Canada withdrawing aid.
Zida told unions on Tuesday he would restore civilian rule within two weeks.
"If everyone agrees, there is no reason that the transition shouldn't be done within two weeks," Zida said, according to union leader Joseph Tiendrebeogo.
Former prime minister Roch Marc Christian Kabore said whoever takes over the country should be a civil society figure rather than a politician or military chief.
"It's obvious we have to find someone who has no clear political affiliations so as not to have a biased view on the transition," said Kabore, who heads the Movement of the People for Progress.
French President Francois Hollande said on Tuesday that Paris helped evacuate Compaore to prevent a potential "bloodbath".
Compaore and his wife are staying in a government mansion in Yamoussoukro, the capital of neighbouring Ivory Coast.
The UN Security Council called for "a peaceful, civilian-led and democratic transition process leading to the holding of free, fair, inclusive and credible elections as soon as possible".
International donors, whose funding is crucial to the impoverished country, were watching the situation closely.
Canada, which provided some $35.6m in aid to Burkina Faso between 2012 and 2013, suspended assistance, saying funding would be restored when a "legitimate and accountable civil authority has been re-established".
Washington said it was still "gathering facts" but could yet withdraw its $14m annual aid package.