Complex sentence: For most of that time he was serving under President Ali Soilih but after Soilih was overthrown and killed in a coup, Mohamed remained in his post for a few months under the new regime of Ahmed Abdallah.
Split into simpler sentences: For most of that time he was serving under President Ali Soilih. After Soilih was overthrown and killed in a coup, Mohamed remained in his post for a few months under the new regime of Ahmed Abdallah.