The Messenger of Allah ﷺ said, "Whoever washes a deceased person should bathe himself, and whoever carries him should perform ablution."
حدثنا أحمد بن صالح حدثنا ابن أبي فديك حدثني ابن أبي ذئب عن القاسم بن عباس عن عمرو بن عمير
أن رسول الله ﷺ قال من غسل الميت فليغتسل ومن حمله فليتوضأ
[Hasan] Bayhaqi related it, 1/303, from the hadith of Abu Dawud through the same chain, and Bukhari mentioned it as a suspended narration in Tarikh al-Kabir, 6/355, 356. The hadith has corroborating narrations, including the one that follows.