Rival militant groups in the Central African Republic agreed to a peace deal on Sunday aimed at ending a conflict that has claimed the lives of thousands of people and displaced nearly a million. The accord called for the disarmament of the groups and their possible prosecution for war crimes committed during the two-year conflict. 

The agreement was signed between 10 militias and the defense ministry in the capital of Bangui, Reuters reported

"On the path towards peace, the step made today is a very important one," Babacar Gaye, the top U.N. official in the country, reportedly said. "I want to believe that the commitment is sincere and that we will engage in the construction of progressive peace."

U.N. authorities said that all sides had agreed to an accord where they would formally disarm, renounce political violence, and begin a process of "disarmament, demobilization, reintegration and repatriation," Voice of America reported.

"The fighters of all the armed groups accept and commit to putting a definitive end to the armed conflicts in Central African Republic," the agreement said, according to Reuters.

The deal also included an agreement banning the use of children as soldiers or other workers. While the accord raised the possibility of amnesty, it reportedly added that amnesty would be denied to those who committed the "crime of genocide, war crimes and crimes against humanity."

The Central African Republic has seen violent clashes since 2013, when the predominantly Muslim Seleka rebels seized power in the country, prompting retaliation from Christian militias. A transitional government under President Catherine Samba-Panza has been formed with the U.N. backing, but sporadic violent events still plague the country.

Nearly 900,000 people have been forced to flee their homes since the violence began, and over 5,000 have died in the conflict.