The Messenger of Allah ﷺ said, "When Allah wills to take the soul of a servant in a particular land, He places in it," or he said, "in that land, a need for him."
حدثنا إسماعيل قال أخبرنا أيوب عن أبي المليح بن أسامة
قال رسول الله ﷺ إن الله تبارك وتعالى إذا أراد قبض روح عبد بأرض جعل له فيها أو قال بها حاجة
Its isnad is sahih, its narrators are well known and trustworthy. Abu Malih bin Usama bin Umayr, Abu Amir, bin Hunayf al-Hudhali, is trustworthy and virtuous, and his hadith is accepted by the group. The hadith was narrated by Tirmidhi 4/453, no. 2147, in the chapter on divine decree, on what has been said that a soul dies wherever it has been decreed to die, and he said it is sahih. Ibn Majah narrated it 2/1424, no. 4263, in the chapter on abstinence, mentioning death, and it was declared sahih in al-Zawaid. Ibn Hibban narrated it 19/11, no. 6151, in al-Ihsan, and Hakim narrated it 1/42, and Dhahabi agreed with him.