Short answer
Walking around the Kaaba, called tawaf, is an act of worship Allah commanded and the Prophet ﷺ showed: seven rounds, starting at the Black Stone, with the Kaaba on your left. That is why the direction is anticlockwise. In the Hanafi school keeping the Kaaba on your left is wajib.
Tawaf of seven rounds with the Kaaba on the left is the way the Prophet ﷺ did it. Most of the rounds (four) are the core of the tawaf and the remaining three are wajib. Keeping the Kaaba on the left is wajib: a tawaf done the other way must be repeated, or a dam is due.
Other madhhabs
- Shafi'i, Maliki and Hanbali
- Keeping the Kaaba on the left and completing all seven rounds are conditions; a tawaf done in reverse or with fewer rounds is not valid.
Explanation
The Quran tells the pilgrims to "perform tawaf around the ancient House", and tells Ibrahim to purify the House for those who walk around it. Tawaf is part of Hajj and umrah, and you may also do it voluntarily at any time you are in the Sacred Mosque. It is worship of Allah, done at the House He chose; Muslims do not worship the building (see do Muslims worship the Kaaba).
Why anticlockwise? Because the Prophet ﷺ started at the Black Stone and walked with the House on his left, and he told the pilgrims to take their rites from him. Writers mention reflections about the heart being on the left, but the reason that settles it is the Sunnah.
- Start: facing the Black Stone, say Bismillah, Allahu akbar and touch, kiss or point to it.
- Seven rounds: each round ends back at the Black Stone line.
- Outside the Hijr: walk around the semicircle too, since it is part of the House (see Hijr Ismail).
- Wudu: wajib in the Hanafi school (see wudu for tawaf).
- After: two rakats, ideally behind the Station of Ibrahim.
What to say while walking is in what to say during tawaf, and the men's sunnahs of uncovering the right shoulder and walking briskly are in idtiba and raml.
The evidence
Quran, Surah Al-Hajj 22:29
ثُمَّ لْيَقْضُوا۟ تَفَثَهُمْ وَلْيُوفُوا۟ نُذُورَهُمْ وَلْيَطَّوَّفُوا۟ بِٱلْبَيْتِ ٱلْعَتِيقِ ﴿٢٩﴾
Then let them end their untidiness and fulfill their vows and perform Tawaf around the ancient House."
Tawaf is a command of Allah for the pilgrims.
Quran, Surah Al-Baqara 2:125
وَإِذْ جَعَلْنَا ٱلْبَيْتَ مَثَابَةًۭ لِّلنَّاسِ وَأَمْنًۭا وَٱتَّخِذُوا۟ مِن مَّقَامِ إِبْرَٰهِۦمَ مُصَلًّۭى ۖ وَعَهِدْنَآ إِلَىٰٓ إِبْرَٰهِۦمَ وَإِسْمَٰعِيلَ أَن طَهِّرَا بَيْتِىَ لِلطَّآئِفِينَ وَٱلْعَٰكِفِينَ وَٱلرُّكَّعِ ٱلسُّجُودِ ﴿١٢٥﴾
And [mention] when We made the House a place of return for the people and [a place of] security. And take, [O believers], from the standing place of Abraham a place of prayer. And We charged Abraham and Ishmael, [saying], "Purify My House for those who perform Tawaf and those who are staying [there] for worship and those who bow and prostrate [in prayer]."
The House was purified for those who walk around it.
Sahih Muslim 1218
Sahih... فاستلم الركن فرمل ثلاثا ومشى أربعا ...
"He touched the corner of the Black Stone, then walked briskly for three rounds and walked normally for four."
The Prophet's tawaf began at the Black Stone and had seven rounds.
Sahih Muslim 1297
Sahih... لتأخذوا مناسككم فإني لا أدري لعلي لا أحج بعد حجتي هذه ...
"Take your rites from me, for I do not know whether I will perform Hajj after this Hajj of mine."
The way of tawaf is taken from the Prophet's practice.
Where the ruling is recorded
- al-Hidaya, Kitab al-Hajj, chapter on ihram, on tawaf. Tawaf begins at the Black Stone and goes to the right of the one walking, with the House on his left.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Hajj, wajibs of tawaf. Lists keeping the House on the left and completing seven rounds among the wajibs.
- al-Majmu' (Nawawi), Kitab al-Hajj, conditions of tawaf. The Shafi'i view that these are conditions of validity.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.