We were traveling with the Messenger of Allah ﷺ on the expedition of Batn Buwat, in pursuit of Majdi bin Amr al-Juhani. Each water-carrying camel was being ridden in turns by groups of five, six, or seven of us.When it came the turn of a man from the Ansar to ride his camel, he made it kneel, mounted it, then urged it on. The camel balked at him somewhat, so he said to it, "Move on, may Allah curse you!"The Messenger of Allah ﷺ asked, "Who is this man cursing his camel?"The man replied, "It is I, Messenger of Allah."He said, "Get down from it. Do not accompany us with a cursed beast. Do not invoke curses upon yourselves, nor upon your children, nor upon your wealth. You may strike upon an hour from Allah in which gifts are sought, and He will answer you."
سرنا مع رسول الله ﷺ في غزوة بطن بواط، وهو يطلب المجدي بن عمرو الجهني، وكان الناضح يعتقبه منا الخمسة والستة، والسبعة، فدارت عقبة رجل من الأنصار على ناضح له، فأناخه، فركبه، ثم بعثه، فتلدن عليه بعض التلدن، فقال له: شأ، لعنك الله. فقال رسول الله ﷺ: من هذا اللاعن بعيره؟ قال: أنا يا رسول الله. قال: انزل عنه، فلا تصحبنا بملعون، لا تدعوا على أنفسكم، ولا تدعوا على أولادكم، ولا تدعوا على أموالكم، لا توافقوا من الله ساعة يسأل فيها عطاء، فيستجيب لكم.
Muslim narrated it in az-Zuhd (3009) through several routes from Hatim bin Ismail, from Yaqub bin Mujahid Abu Hazra, from Ubada bin Walid bin Ubada bin Samit, who said, "My father and I set out seeking knowledge among this clan of the Ansar before they passed away, and the first person we met was Abu Yasr, a companion of the Messenger of Allah ﷺ," then he related the hadith.Then he said, "Then we went on until we came to Jabir bin Abdullah in his mosque..." then he related the hadith.