[3] During his governorship Harun was repeatedly confronted by threats to Mecca's security and was forced to deal with recurring periods of political and economic instability.
In 881/2 the city was targeted by the brigand Abu al-Mughirah al-Makhzumi, who marched against it with his forces; while Harun was successful in raising an army and stopping the advance, he was unable to prevent Abu al-Mughirah from subsequently devastating 'Ayn Mushas and Jeddah, in the process depriving Mecca of much of its drinking water and causing bread prices to soar.
In 881 and again in 883 Ibn Tulun and Ibn al-Layth each sent armed forces to assert their claims in Mecca, resulting in the outbreak of disturbances within the city; on both occasions Harun intervened with his troops to maintain order, and he played an important role in driving out the Egyptians during the Battle of Mecca in 883.
In the aftermath of the accident, Harun and the qadi Yusuf ibn Ya'qub submitted a report to Baghdad, whereupon the caliphal regent al-Muwaffaq immediately ordered the damage to be repaired and sent funds to pay for the project.
After the restoration work was completed in the following year two memorial plaques dedicated to al-Muwaffaq were hung in the mosque, one of which bearing Harun's name and the other that of the qadi and the project architect.