Abdullah bin Abbas reported,

This was revealed while the Messenger of Allah ﷺ was still in hiding at Makkah. When he prayed with his companions he would raise his voice in reciting the Quran, and when the idolaters heard him they would revile the Quran, the One who sent it down, and the one who brought it. So Allah said to His Prophet ﷺ, "And do not be loud in your prayer" meaning, in your recitation, so that the idolaters hear it and revile the Quran, "nor be too quiet in it" from your companions, so that they cannot hear you, "but seek a way between that" [Isra 17:110].

Azami 12679

Sahih

في قوله تعالى: {ولا تجهر بصلاتك ولا تخافت بها}

عن ابن عباس قال

نزلت ورسول الله ﷺ مختف بمكة كان إذا صلى بأصحابه رفع صوته بالقرآن فإذا سمعه المشركون سبوا القرآن ومن أنزله ومن جاء به فقال الله تعالى لنبيه ﷺ: {ولا تجهر بصلاتك} أي: بقراءتك فيسمع المشركون فيسبوا القرآن {ولا تخافت بها} عن أصحابك فلا تسمعهم {وابتغ بين ذلك سبيلا}.

الأعظمي 12679صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "Say, call upon Allah or call upon Rahman, whichever you call upon, to Him belong the most beautiful names. And do not recite your prayer aloud nor silently, but seek a way between that"
Numbering
Jami al-Kamil 12679 (2nd edition)
Azami 12679