After setting a new fabric of administration, Abu Abdullah made preparations to finally march to Sijilmasa. He appointed his brother Abul Abbas and Abu Zaki Tammam bin Muarik as deputy leaders and marched with a large army, having been joined by innumerable tribes who had hitherto witheld their support. He reached Sijilmasa after an arduous and dangerous journey from the remotest route. The situation at Sijilmasa was rather tricky, since al-Mahdi had been imprisoned there and any wrong move by Abu Abdullah might have endangered the life of Imam. Thus, he sent a peace mission to the governor, asking to release al-Mahdi. The governor killed the messenger, therefore, Abu Abdullah had no choice but to engage in warfare. However, after a brief battle, the governor fled and his army dispersed. Abu Abdullah then triumphantly entered Sijilmasa and liberated al-Mahdi, his son, entourages and pages.
Abu Abdullah saw his Imam for the first time, whom he had never seen before. As soon as al-Mahdi made his appearance, Ibn al-Muttalibi said to Abu Abdullah that, "Lo, this is my master and yours and the master of all the people." There was immense rejoicing amongst the troops while beholding al-Mahdi. The faithful followers crowded around the horses of al-Mahdi and his son, al-Qaim and Abu Abdullah walked in front. Abu Abdullah dismounted, and so did Ibn al-Muttalibi and the troops. According to "Iftitahu'd-Dawa" (p. 245), Abu Abdullah was overjoyed and said to the people: "This is the Lord, mine and thine, and your Wali al-Amr, your Imam-i Zaman and your Mahdi, on whose behalf I preached you. God has fulfilled His promise about him, and assisted his supporters and troops. He is your Ulul Amr."
Al-Mahdi remained for 40 days in Sijilmasa to restore peace and finally, he embarked for Raqada via Ikjan with his son and their whole entourage, along with Abu Abdullah and his companions. An interesting account is given in "Sirat-i Jafar" that, "Al-Mahdi marched at the head of a huge army, such as no king before him could ever muster, and ultimately reached the Katama country. I remember, said Jafar, that when we were passing through the Sanhaja country, and were marching near the place in which (later on) was founded the town of Ashir, al-Mahdi asked the name of the hills that appeared before him. He was told that the name of the range was Jabal Sanhaja. And he said that a treasure was buried in these mountains."
Ashir (French, Achir) is an ancient fortified town in Algeria, and was founded by Ziri bin Manad, the chieftain of the Sanhaja in the mountains of Titeri about in 324/945. From Ashir, the ranges of Jabal Sanhaja, or Jabal Chelia, about 7638 feet high from sea-level are seen. Before over a thousand years, al-Mahdi had foretold that these mountains were rich with hidden treasures. In Jabal Chelia including Mount Aures and Mount Titeri in Algeria, the petroleum was discovered in 1956, and natural gas in 1980. It is estimated that the natural gas fields are among the world's largest known reserves at 35 trillion cubic feet, and estimate of oil reserves runs as high as 12 billion barrels.