Sunan an-Nasa'i, Book 25, Hadith 92 (Nasa'i 3182)

It was narrated from Abu Sukainah, a man from among the Muharririn, that a man among the Companions of the the Prophet (ﷺ) said:

"When the Prophet (ﷺ) commanded them to dig the trench (Al-Khandaq), there was a rock in their way preventing them from digging. The Messenger of Allah (ﷺ) stood, picked up a pickaxe, put his Rida' (upper garment) at the edge of the ditch and said: 'And the Word of your Lord has been fulfilled in truth and in justice. None can change His Words. And He is the All-Hearer, the All-Knower.' One-third of the rock broke off while Salman Al-Farisi was standing there watching, and there was a flash of light when the Messenger of Allah (ﷺ)struck (the rock). Then he struck it again and said: 'And the Word of your Lord has been fulfilled in truth and in justice. Nonce can change His Words. Ans He is the All-Hearer, the All-Knower' And another third of the rock broke off and there was another flash of light, which Salman saw. Then he struck (the rock) a third time and said: 'And the Word of your Lord has been fulfilled in truth and in justice. None can change His Words. And He is the All-Hearer, the All-Knower.' The last third fell, and the Messenger of Allah (ﷺ) came out, picked up his Rida' and sat down. Salman said: 'O Messenger of Allah, Each time you struck the rock there was a flash of light.' The Messenger of Allah (ﷺ) said to him: 'O Salman, did you see that?' He said: 'Yes, by the One Who sent you with the truth, O Messenger of Allah.' He said: 'When I struck the first blow, the cities of Kisra and their environs were shown to me, and many other cities, and I saw them with my own eyes.' Those of his Companions who were present said: 'O Messenger of Allah, pray to Allah to...