During the Battle of Khandaq, the Companions found a rock that was too immense for their spades to break up. Therefore, they sought the help of the Messenger of Allāh ﷺ, who struck the rock three times.
Each time he (the Prophet ﷺ) would strike it, a bright light would spark – and in another narration it was like a light in the middle of a dark night.
Rasūlullāh ﷺ took the spade, and struck the rock uttering: “Allāhu Akbar! The keys of ancient Syria are granted to me, I swear by Allāh, I can see its palaces at the moment”; on the second strike he said: “Allāhu Akbar, Persia is granted to me, I swear by Allāh, I can now see the white palace of Madain”; on the third strike he said: “Allāhu Akbar, I have been given the keys of Yemen, I swear by Allāh, I can see the gates of San’ā’ while I am in my place.” [Aḥmad & Nasā’ī]
All these countries were then conquered exactly as the the Messenger of Allāh ﷺ informed us.