Usul al-Kafi
Book 4:
The Book of Divine Proof

Chapter 89
Succession to the status of Imamate

474. 2. Imam Jafar as-Sadiq (p) was asked about the well-known tradition of the Prophet Muhammad (p), “One, who dies without recognizing the Imam (p) of his time, dies the death of an ignorant person.” The Imam (p) said that the tradition is correct. Then the Imam was asked: If the Imam (p) dies and a man who lives in Khurasan, neither knows the vice-regent of the deceased Imam (p) nor is he in a position to travel, what should he do?
The Imam (p): In such a case, the people who live in the city in which the Imam (p) has died will have to follow the Imam (p) who was designated as an Imam (p) by the deceased Imam (p), and those who do not live in that city must wait till the news reaches them through the group of the people who had gone to find out about the succession.
The Imam (p) then quoted the verse: ... Why then does not have a party representing every section of them go forth that they may be fully instructed in religion and that they may warn their people on return, to guard against ignorance (Q, 9:122) …