لسان الدين بن الخطيب
In 1362, the former emir of Granada, Muhammed V, was able to regain the throne with help from the Moroccan sultan. This allowed Ibn al-Khatib to return to Granada and resume the office of Great Vizier ("dhu al-wizaratayn", ie. 'possessor of the two vizierates', meaning 'head of both the civil and military authority'). He soon ran afoul of severe political intrigue. He was eventually able to strengthen his own position while organizing the expulsion of a number of his North African political rivals from Granada. His political successes caused friction within Granada between supporters of the expelled North Africans and the politically savvy Ibn al-Khatib. When Ibn Khaldun had some diplomatic success at Granada's court, Ibn al-Khatib, fearing him as a rival, organized his expulsion.