Complex sentence: Tughj defected to the invading Abbasids under Muhammad ibn Sulayman, and was named governor of Aleppo in return; but Ibn Sulayman himself fell victim to court intrigues soon after, and Tughj along with his sons Muhammad and Ubayd Allah were imprisoned in Baghdad.
Split into simpler sentences: Tughj defected to the invading Abbasids under Muhammad ibn Sulayman, and was named governor of Aleppo in return. However Ibn Sulayman himself fell victim to court intrigues soon after, and Tughj along with his sons Muhammad and Ubayd Allah were imprisoned in Baghdad.