teach his Companions, when visiting graves, to greet their occupants with peace, saying:
“Peace be upon you, inhabitants of these abodes, believers and Muslims.”
Those who regard the invocation of peace as exclusive to him do not prohibit greeting someone who is present. Rather, they say that peace should not be invoked upon someone who is absent. Thus, they regard invoking peace upon him in his absence as exclusive to him. This is correct. However, it is the command to do so, and its being obligatory, that are exclusive to him, as in the tashahhud, the testimony recited in prayer: no specific individual is greeted with peace in it except him. The same applies when entering and leaving the mosque. This supports the view that invoking peace is like invoking blessings: both are obligatory for him, within prayer and outside it. For anyone else, nothing is obligatory except the greeting of peace upon meeting, which is emphatically prescribed by agreement. Whether it is obligatory or recommended is the subject of two well-known views in Ahmad’s school and elsewhere. The scriptural texts indicate that it is obligatory.
Muslim narrated in his Sahīh that the Prophet, may Allah bless him and grant him peace, said:
“Five things are owed by one Muslim to another: to greet him when he meets him, visit him when he is ill, accompany his funeral procession when he dies, accept his invitation when he invites him, and—as also narrated—invoke Allah’s mercy upon him when he sneezes.”
Most jurists have held that accepting an invitation is obligatory. Offering the funeral prayer for the deceased is a communal obligation by their consensus, and greeting someone upon meeting him is more emphatically required than accepting his invitation. The same applies to visiting the sick. The harm caused by failing to greet someone upon meeting him or to visit him when he is ill is greater than that caused by declining his invitation. Moreover, greeting someone is easier than accepting an invitation or visiting the sick. These matters are discussed at length elsewhere.