During his long reign he proved himself competent in an age where Africa was being colonized by stronger European nations, such as neighbouring Ottoman Algeria which was invaded by France.
[8] To recoup his expenses Moulay Abd al-Rahman decided to revive the institution of Barbary piracy and reestablish his corsairing fleet.
[8] The Austrian landing at Larache frightened the Moroccan people on a general attack on the Muslims of North Africa, following when war started between the French and the Ottoman province of Algiers in 1827.
[13] In the years preceding the French landing, in order to replace revenue lost through the demise of piracy, the Deys (the Ottoman-appointed heads of the Regency of Algiers) had raised taxes, turning the native population against them.
As French forces pushed deeper into the interior, the tribes and city dwellers of the Province of Oran turned to Morocco for help.
[14] In the summer of 1830, Abd al-Rahman accepted boatloads of Algerian refugees arriving in the ports of Tangier and Tétouan, ordering his governors to find them housing and settle them into work.
[14] Shortly after Algiers fell in 1830, and fearing French invaders, Muhammad Bennouna organised a deputation to ask Moulay Abd al-Rahman to accept a bay'a from Tlemcen.
[15] In September 1830 the Tlemcenis sent another letter arguing that the authority of the Sublime Porte no longer existed, and that its former representatives had been irreligious tyrants.
The notables of the beleaguered city kept pressuring for a Moroccan intervention, reminding Abd al-Rahman that the defense of Islam was the duty of the just ruler.
After the sultan learned about the unpopularity of the chief minister, he dismissed him, took away his wealth, and gave it to the Wadaya as a generous bribe, but this did not stop the rebellion.
A few months later, the sultan managed to escape Fes and settle in Meknes, where he slowly built the army there by recruiting more troops.
The sultan ordered the execution of the two most important leaders of the Wadaya revolt, and dispersed them from Fes to Marrakesh, Larache, and Rabat, ending their rebellion.
Abd al-Rahman consented to the Treaty of Tangier in October 1844, withdrawing support for al-Qadir, and reducing border garrisons.
Abd al-Rahman in fact rejected the Treaty of Lalla Maghnia at first, blaming it on his negotiators, but was eventually forced to ratify it.
Army units and rural tribes across the north and east, already basically ungovernable, started raising rebellions which were only crushed with difficulty.
The crushing defeat at Isly and the bombardment of the Moroccan ports by the squadron commanded by the Prince de Joinville had grave consequences both for the sultan's internal authority and for his relations with Europe.
Rebellious tribes threatened Marrakesh, and in September 1845 Rabat rebelled and its leaders chose a local notable to replace the governor appointed by the sultan.
The Scandinavian countries immediately ceased to make him the customary annual gift to retain commercial relations with Morocco.
[24] After the defeat of Isly, Moroccan tolerance for Abd el-Qadir's use of Morocco to launch raids upon French controlled Algeria waned.
At 10:00 a.m, the French fleet opened fire on the forts of Salé, while the Moroccans retaliated instantly with forty batteries of artillery weapons.
[27] An hour later, the batteries in Salé were destroyed, while the artillery in Rabat were damaged to the point where they became almost useless, however Moroccan reinforcements arrived.
[31][32] In 1856, Moulay Abd al-Rahman established the souk of Zraqten on the north side of the High Atlas, adding to territory in southern Morocco controlled by the Glaouis, who were Caids ruling various southern areas from the 18th century until Moroccan independence in 1956, after originally settling in Telouet to establish a souk.