Sunan Ibn Majah, Book 6, Hadith 113 (Ibn Majah 1545)

It was narrated that ‘Ubadah bin Samit said:

“When the Messenger of Allah (ﷺ) followed a funeral, he would not sit down until it had been placed in the niche-grave. A rabbi came to him and said: ‘This is what we do, O Muhammad!’ So the Messenger of Allah (ﷺ) sat down and said: ‘Be different from them.’”