Sahih Muslim Book 7, Hadith Number 2986.

Chapter : It is preferable to get one’s hair cut (as a ritual of pilgrimage) but clipping is also permissible.

Ubaidullah reported this Hadith with the same chain of transmitters and (it is said) that it was on the fourth turn that he (the Holy Prophet) said: (May Allah have mercy upon) those who got their hair clipped.”