Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) said: "When a person comes to a gathering, he should greet (with salam). Then if he finds it appropriate to sit, he may sit. And when he stands up (to leave), he should greet (with salam) again, because the first (greeting) does not have more right than the second."