He was mentioned in the Quran as the "second of the two who lay in the cave" in reference to the event of hijra, where with Muhammad he hid in the cave in Jabal Thawr from the Meccan search party that was sent after them, thus being one of few who were given direct mention in the Quran.