Abdullah bin Abbas reported,

Concerning the words of Allah عز وجل, "And do not raise your voice in your prayer, nor be too quiet in it" [Isra 17:110], he said, This was revealed while the Messenger of Allah ﷺ was in hiding at Makkah. Whenever he led his companions in prayer, he would raise his voice with the Quran, and when the idolaters heard it they would insult the Quran, the One who sent it down, and the one who brought it. So Allah Almighty said to His Prophet ﷺ, "And do not raise your voice in your prayer" so that the idolaters hear your recitation, "nor be too quiet in it" so that your companions cannot hear. Let them hear the Quran, but do not raise your voice that loudly. "But seek between that a way", meaning between raising the voice and lowering it.

Muslim 1001

Sahih

حدثنا أبو جعفر محمد بن الصباح وعمرو الناقد جميعا عن هشيم قال ابن الصباح حدثنا هشيم أخبرنا أبو بشر عن سعيد بن جبير

عن ابن عباس

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

مسلم 1001صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Moderate recitation in audible prayers, between aloud and silent, when one fears harm from reciting aloud
Numbering
Darussalam 1001
Muslim 1001