Al-Lihyani's rise began when he was appointed to the senior office of "sheikh of the Almohads" in 1295 by
Abu Asida Muhammad II. From this position he controlled the army and foreign affairs. Al-Lihyani brokered the agreement between Abu Asida and
Abu-l-Baqa Khalid An-Nasr of
Béjaïa regulating the succession of the two domains. In 1305 he negotiated the commercial agreement with the
Republic of Venice. He also maintained a friendly correspondence with
James II of Aragon over the commandership of the Catalan mercenary guard in Tunis, which nominally served at the King of Aragon's pleasure. Al-Lihyani also negotiated a ten-year truce between Tunis and Aragon in 1301. In a letter of 20 May 1302 to al-Lihyani, James praised the ‘wise and discreet’ counsellor for the ‘good will and strong affection’ he had shown him during the negotiations. In 1306, as commander of the army, al-Lihyani mounted an expedition to liberate
Djerba from Christian control. The effort failed, but rather than return to Tunis, al-Lihyani joined a caravan heading east on the pilgrimage to
Mecca. On his return he settled in
Tripoli, where he was when Abu Asida died in 1309. ==Period in power==