Sahih al-Bukhari Book 65, Hadith 244
(regarding): 'Neither say your, prayer aloud, nor say it in a low tone.' (17.110) This Verse was
revealed while Allah's Messenger (ﷺ) was hiding himself in Mecca. When he prayed with his companions, he
used to raise his voice with the recitation of Qur'an, and if the pagans happened to hear him, they
would abuse the Qur'an, the One who revealed it and the one who brought it. Therefore Allah said to
His Prophet : 'Neither say your prayer aloud.' (17.110) i.e. do not recite aloud lest the pagans should
hear you, but follow a way between.
While I was in the company of the Prophet (ﷺ) on a farm and he was reclining on a palm leave stalk, some Jews passed by. Some of them said to the others. "Ask him (the Prophet (ﷺ) about the spirit." Some of them said, "What urges you to ask him about it" Others said, "(Don't) lest he should give you a reply which you dislike." But they said, "Ask him." So they asked him about the Spirit. The Prophet (ﷺ) kept quiet and did not give them any answer. I knew that he was being divinely inspired so I stayed at my place. When the divine inspiration had been revealed, the Prophet (ﷺ) said. "They ask you (O, Muhammad) concerning the Spirit, Say: "The spirit," its knowledge is with my Lord; and of knowledge you (mankind) have been given only a Little." (17.85)
The (above) verse was revealed in connection with the invocations.