Sunan Abi Dawud, Book 38, Hadith 11 (Abu Dawud 4290)

Umm salamah reported the Prophet (ﷺ) as saying about the swallowing up an army by the earth. I asked:

How will a man who comes against his will (be swallowed up by the earth), Messenger of Allah ? He replied: All will be swallowed up, but each will be raised according to his intention on the Day of Resurrection.