Chapter: The recommendation to offer salām when one rises from a gathering and parts from his companions or seat-mate
869 – Abu Hurayrah (may Allah be pleased with him) reported that the Messenger of Allah (peace and blessings be upon him) said, “When one of you arrives at a gathering, let him give salām; and when he wishes to stand up and leave, let him give salām, for the first occasion is no more deserving than the second.” Recorded by Abū Dāwūd and al-Tirmidhī, who graded it ḥasan (good).
This ḥadīth shows that when a person enters a gathering he should greet those present with salām, and that when he decides to depart, rises, and leaves, he should likewise give salām, because the Prophet (peace and blessings be upon him) commanded it and said, “The first is no more entitled than the second,” meaning: just as you greet upon entering, so too should you greet upon leaving.
For that reason, when someone enters the mosque he sends peace and blessings upon the Prophet (peace and blessings be upon him), and when he exits he does the same. In the same vein, when a person enters Mecca for ʿumrah (the lesser pilgrimage) or ḥajj, he begins with ṭawāf (circumambulating the Kaʿbah); and when he leaves Mecca he ends with ṭawāf, for ṭawāf is the greeting of Mecca for anyone who comes for ḥajj or ʿumrah, and it is also the farewell of Mecca for the pilgrim who then sets out on his journey.
And this is part of