Nafi reported,

A man came to Ibn Umar and said, "Abu Abdul-Rahman, what made you perform Hajj one year and Umrah another year and abandon jihad in the path of Allah عز وجل, when you know how greatly Allah has encouraged it?"Ibn Umar replied, "Son of my brother, Islam is built upon five things: belief in Allah and His Messenger, the five daily prayers, fasting Ramadan, paying zakat, and performing Hajj to the House."The man said, "Abu Abdul-Rahman, do you not hear what Allah has mentioned in His Book, 'If two parties among the believers fall into fighting, then make peace between them. But if one of them transgresses against the other, then fight the one that transgresses until it returns to the command of Allah' [Hujurat 49:9], and 'Fight them until there is no more persecution' [Baqarah 2:193]?"Ibn Umar said, "We did so in the time of the Messenger of Allah ﷺ, when Muslims were few and a man would be persecuted for his faith, either being killed or tortured, until Islam grew strong and there was no longer any persecution."

Bukhari 4514

Sahih

وزاد عثمان بن صالح عن ابن وهب قال أخبرني فلان وحيوة بن شريح عن بكر بن عمرو المعافري أن بكير بن عبد الله حدثه

عن نافع

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

البخاري 4514صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
His saying, "And fight them until there is no fitnah and the religion is for Allah. But if they cease, then there is no aggression except against the wrongdoers"
Numbering
Darussalam 4514
Bukhari 4514