It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that when it was intended to dig a grave for the Prophet (peace and blessings be upon him), Sayyiduna Abu Ubaydah bin al-Jarrah (may Allah be pleased with him) used to dig straight trench graves for the people of Makkah, and Sayyiduna Abu Talhah Zayd bin Sahl (may Allah be pleased with him) used to dig niche graves (lahd) for the people of Madinah. Sayyiduna Abbas (may Allah be pleased with him) called two men and took hold of them by their necks; he said to one: "Go to Abu Ubaydah," and to the other: "Go to Abu Talhah," and he said: "O Allah! Choose for the Messenger of Allah (peace and blessings be upon him) whichever of the two comes to dig his (peace and blessings be upon him) grave." Abu Talhah's companion found him and brought him, while Abu Ubaydah's companion did not find Abu Ubaydah, so a niche grave (lahd) was prepared for the Messenger of Allah (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6717