The UN Security Council is welcoming an agreement in Congo calling for President Joseph Kabila to leave power after an election by year's end.

The New Year's Eve accord followed months of unrest that left dozens dead and threatened to further destabilize the Central African nation with a history of dictatorship and civil war.

Kabila was barred from seeking a new term after his mandate expired Dec 19. But a court ruled he could stay on until elections, and his party said those weren't possible before mid-2018.

The council said in a statement by its president yesterday it was encouraged "by the spirit of flexibility and compromise" shown in reaching the agreement.

It stressed the importance of taking "all necessary steps to accelerate preparations for the elections without further delays."