That agreement ended the two decade-long civil war between the government in Khartoum and southern rebels .