A festering civil war and a rigged election could spark chaos that would affect the entire continent’s security