Slideshow ( 4 images )

KHARTOUM (Reuters) - Central African Republic signed a peace deal with 14 armed groups on Tuesday following two weeks of talks in the Sudanese capital Khartoum.

The peace deal was announced on Saturday by the African Union but the terms were not immediately released.

Central African Republic has been rocked by violence since 2013 when mainly Muslim Selaka rebels ousted then-president Francois Bozize, prompting reprisals from mostly Christian militia.

Thousands of people have died because of the unrest in the diamond and gold-producing country, and a fifth of the 4.5 million population have fled their homes.

A 12,000-strong U.N. peacekeeping mission, deployed since 2014, has struggled to restore order to the countryside where the government has little or no control and attacks on civilians are frequent. Over a dozen peacekeepers were killed by rebels in 2017 alone.

The government and rebels expressed optimism over the deal on Saturday. Lasting peace is not guaranteed, however, because similar agreements in 2014, 2015 and 2017 all broke down.