The two candidates in the disputed presidential election in the Georgian breakaway republic of Abkhazia have agreed to run as a team in a new vote.
The October poll was the region's first contested presidential election
Sergei Bagapsh will run for the post of president. His supporters occupied the main government building last month.
His former rival, Raul Khadzhimba, favoured by Russia, will run as vice-president.
Abkhazia has been virtually paralysed since Mr Bagapsh claimed victory in the presidential poll held on 3 October.
"It is a very solid compromise," Mr Bagapsh told the Reuters news agency.
"We will try to make things happen calmly, in an orderly way now," he added.
"We have agreed that we will take all the necessary measures tomorrow in order to defuse the situation," Mr Khadzhimba told Russian television.
"I think this is the most favourable state of affairs," he added.
Mr Bagapsh was announced the winner of the October poll after a recount. Mr Khadzhimba disputed the ruling.
The incumbent president, Vladislav Ardzinba - seen as strongly pro-Russian - refused to acknowledge that Mr Bagapsh won, as did the Kremlin.
The election was later declared invalid by the Supreme Court and a new vote was ordered.
However, Mr Bagapsh had defiantly scheduled his inauguration for Monday.
Moscow cut rail links to the territory and threatened to impose an economic blockade if he went ahead with the inauguration, because of what it called "the instability of the situation".
Armed militias loyal to Mr Bagapsh had held government buildings and the broadcasting centre in Sukhumi, the capital, while armed men supporting his rival also occupied a number of buildings.
Both candidates denied reports of a deal to end the deadlock, but after last-minute talks they agreed to run
in a new poll as a single team.
Abkhazia has been de facto independent from Georgia since a bloody inter-ethnic conflict in the early 1990s.
For years, Russia has been Abkhazia's only lifeline and a major influence on local life and politics.