It was narrated from Abu Sa'eed Al-Khudri that the Messenger of Allah (ﷺ) said:
Gog and Magog people will be set free and they will emerge as Allah says: swoop(ing) down from every mound. [21:96] They will spread throughout the earth, and the Muslims will flee from them until the remainder of the Muslims are in their cities and fortresses, taking their flocks with them. They will pass by a river and drink from it, until they leave nothing behind, and the last of them will follow in their footsteps and one of them will say: 'There was once water in this place.' They will prevail over the earth, then their leader will say: 'These are the people of the earth, and we have finished them off. Now let us fight the people of heaven!' Then one of them will throw his spear towards the sky, and it will come back down smeared with blood. And they will say: 'We have killed the people of heaven.' While they are like that, Allah will send a worm like the worm that is found in the noses of sheep, which will penetrate their necks and they will die like locusts, one on top of another. In the morning the Muslims will not hear any sound from them, and they will say: 'Who will sell his soul for the sake of Allah and see what they are doing?' A man will go down, having prepared himself to be killed by them, and he will find them dead, so he will call out to them: 'Be of good cheer, for your enemy is dead!' Then the people will come out and let their flocks loose, but they will not have anything to graze on except their flesh, and they will become very fat as if they were grazing on the best vegetation they ever found.'