Sayyiduna Usamah bin Zayd (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) passed by a gathering in which there were Muslims, polytheists, Jews and idol worshippers, and he (peace and blessings be upon him) greeted them with salam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6828