The Wahhabis attack Makkah and became involved with fighting many of the tribes. They captured at- Ta’if and appointed ‘Uthman al -Madayiqiyy as the governor. This governor joined forces with some of the Wahhabis’ soldiers and started fighting the tribes next to the borders of Makkah and al-Madinah until they pledged allegiance to them. They eventually subdued all the tribes and captured all the lands originally under the authority of the Governor of Makkah. After this, ‘Uthman al-Madayiqiyy mobilized his army in an attempt to capture Makkah.
In 1220A.H. they lay siege to Makkah and then surrounded it from all directions to tighten this siege. They blocked the routes to the city and prevented supplies from reaching there. It was a great hardship on the people of Makkah. Food became exorbitantly expensive and then unavailable. They resorted to eating dogs. Sharif Ghalib was compelled to ask for reconciliation with the Wahhabis. He accepted for some people to arbitrate between them. He signed an agreement with conditions stipulating the rulership of Makkah would be kept for him, and the people of Makkah would be treated leniently. The Wahhabis accepted these conditions. They entered Makkah by the end of Dhul-Qa’dah in 1220 A.H. They also gained control of al-Madinah.
They plundered what was in the room of the Nabi, sallallahu ‘alayhi wa sallam, took all the money that was there, and did some disgraceful acts. They appointed a man among them, Mubarak Ibn Madyan, as the governor of al-Madinah. The Wahhabis ruled Makkah and al-Madinah for seven years. During these years, they prevented the people of ash-Sham and Egypt from entering Makkah carrying the cloak (21) of
the Ka’bah when they came to perform the pilgrimage. The Wahhabis started to make the cloak forthe Ka’bah from black material. They prevented the people from smoking tobacco. When they found someone smoking they punished him fiercely. During this time, the Wahhabis destroyed the domes built on the graves of the righteous Muslims.