Saeed bin Jubayr reported,

Abdullah bin Umar came out to us, and we hoped he would narrate to us a fine hadith. A man hurried up to him and said, "Abu Abdul-Rahman, tell us about fighting during civil strife, for Allah says, 'And fight them until there is no more fitnah' [Baqarah 2:193]."Abdullah bin Umar replied, "Do you even know what fitnah is, may your mother be bereaved of you? Muhammad ﷺ used to fight the polytheists, and entering into their religion was the fitnah. It was not like your fighting over kingship."

Bukhari 7095

Sahih

حدثنا إسحاق بن شاهين الواسطي حدثنا خالد عن بيان عن وبرة بن عبد الرحمن

عن سعيد بن جبير قال

خرج علينا عبد الله بن عمر فرجونا أن يحدثنا حديثا حسنا قال فبادرنا إليه رجل فقال يا أبا عبد الرحمن حدثنا عن القتال في الفتنة والله يقول {وقاتلوهم حتى لا تكون فتنة} فقال هل تدري ما الفتنة ثكلتك أمك إنما كان محمد ﷺ يقاتل المشركين وكان الدخول في دينهم فتنة وليس كقتالكم على الملك

البخاري 7095صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tribulations
Chapter
Prophet's ﷺ saying, "Tribulation comes from the east"
Numbering
Darussalam 7095
Bukhari 7095