Prophet Ibraheem (Abraham) (may peace be upon him) said this phrase when he was thrown into the fire and it became cool and peaceful for him. The Prophet (bpuh) said it at the battle of Uhud and Allah made him victorious. When Ibraheem was placed where the fire was to be set, the angel Jibreel came to him and asked, "Do you need anything from me?" lbraheem confidently responded, "From you, no. But from Allah, yes!"
Prophet Moosa (Moses) (may peace be upon him) saw the sea in front of him and the enemy behind him, and he said:
('Nay verily! with me is my Lord, He will guide me.)
(Qur'an 26: 62)
It is mentioned in some narrations that when the Prophet (bpuh) was hiding in the cave, a pigeon came by the will of Allah and made its nest at the entrance, and a spider built its house at the mouth of the cave. The disbelievers said, "This is a sign that the cave had not been disturbed," and they said, "Muhammad has not entered here."
Protection from the Lord of all that exists reaches those who have faith in Him and faith in His being All-Powerful and Most Merciful. Shawqi said:
"If this protection is directed at you, Sleep, since everything that happens is peace."
(For verily you are under Our Eyes….) (Qur'an 52: 48)
(Allah is the Best to guard, and He is the Most Merciful of those who show mercy.) (Qur'an 12: 64)