A yearlong rift between the neighboring countries threatened further instability on the Horn of Africa.