The deal is intended to end six years of conflict which has killed some 400,000 people.