Abu Sawar reported,

I saw the Messenger of Allah ﷺ with people following him, so I followed him along with them. Suddenly the people rushed forward, and I lagged behind. The Messenger of Allah ﷺ came up to me and struck me a blow, either with a palm-branch, a stick, a tooth-stick, or something else he had with him. By Allah, it did not hurt me.I spent that night, and I said to myself, "The Messenger of Allah ﷺ did not strike me except for something Allah had taught him about me." I told myself that I would go to the Messenger of Allah ﷺ when morning came.Then Jibreel عليه السلام descended upon the Prophet ﷺ and said, "You are a shepherd, so do not break the horns of your flock."When we had prayed the morning prayer, or he said when morning came, the Messenger of Allah ﷺ said, "O Allah, there are people who follow me, and it does not please me that they follow me. O Allah, whomever I have struck or reviled, make it for him an expiation and a reward," or he said, "forgiveness and mercy," or as he said.

Ahmad 22510

Sahih

حدثنا عارم حدثنا معتمر بن سليمان عن أبيه حدثنا السميط عن أبي السوار حدثه

أبو السوار عن خاله قال

رأيت رسول الله ﷺ وأناس يتبعونه فأتبعته معهم قال ففجئني القوم يسعون قال وأبقى القوم قال فأتى علي رسول الله ﷺ فضربني ضربة إما بعسيب أو قضيب أو سواك وشيء كان معه قال فوالله ما أوجعني قال فبت بليلة قال أو قلت ما ضربني رسول الله ﷺ إلا لشيء علمه الله في قال وحدثتني نفسي أن آتي رسول الله ﷺ إذا أصبحت قال فنزل جبريل عليه السلام على النبي ﷺ فقال إنك راع لا تكسرن قرون رعيتك قال فلما صلينا الغداة أو قال صبحنا قال قال رسول الله ﷺ اللهم إن أناسا يتبعوني وإني لا يعجبني أن يتبعوني اللهم فمن ضربت أو سببت فاجعلها له كفارة وأجرا أو قال مغفرة ورحمة أو كما قال

أحمد 22510صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Sawar, from his maternal uncle
Numbering
Darussalam 22510
Ahmad 22510