"When Allah decrees that a slave (of His) is to die in a land, He makes him have some need from it."

Another chain reports a similar narration.
Jami` at-Tirmidhi Book 32, Hadith 14