Maliks Muwatta Book 16, Hadith Number 28.

Section : Burying the Dead.

Yahya related to me from Malik from Hisham ibn Urwa that his father said, “There were two men in Madina, one of whom dug graves with a niche in the side wall for the body, and the other who did not, and they said, ‘Whichever one comes first can do the job,’ and the one who dug graves with a niche came first and dug the Messenger of Allah’s grave, may Allah bless him and grant him peace.”