Ibrahim bin Ubayd bin Rifa'ah bin Rafi' bin Malik bin Ajlan al-Ansari (may Allah have mercy on him) narrates from his father, from his grandfather; he said: We were advancing on the day of Badr when we could not find the Messenger of Allah (peace and blessings be upon him), so the groups of travellers called out to one another: Is the Messenger of Allah (peace and blessings be upon him) among you? They stopped until the Messenger of Allah (peace and blessings be upon him) came, and with him was Sayyiduna Ali bin Abi Talib (may Allah be pleased with him). They said: O Messenger of Allah, we missed you. He (peace and blessings be upon him) said: "Abu al-Hasan (Ali) had cramps in his stomach, so I stayed back with him."
Hadith Referenceالمعجم الكبير للطبراني / باب الراء / 4533