I went on reproaching him for invoking ruin upon his people until he wept for them and moved me to tears as well. He said, “Most assuredly, I am among those who repent of that, and I seek refuge in Allah lest I be one of the ignorant.”
He continued: “I was with Ṣāliḥ in his mosque, together with those of his people who had believed in him, and I never stopped censuring him for praying against his people until he wept and made me weep. He said, ‘I am indeed among those who regret it, and I seek refuge in Allah lest I be of the ignorant.’ I used to visit Jacob; I was with Joseph in the secure place; I would meet Elijah in the valleys—and I still meet him to this day. I also encountered Moses son of ʿImrān, and he taught me from the Torah, saying, ‘If you meet Jesus son of Mary, convey my greetings of peace to him.’ I later met Jesus son of Mary and conveyed Moses’s greetings to him, and Jesus said, ‘If you meet Muḥammad ﷺ convey my greetings of peace to him.’”
At this the Messenger of Allah ﷺ let his eyes flow with tears and said, “Peace be upon Jesus for as long as the world remains, and peace be upon you, O Hām, for discharging the trust.”
He (Hām) said, “O Messenger of Allah, do with me what Moses did, for he taught me from the Torah.”
So the Messenger of Allah ﷺ taught him the chapters: “When the Inevitable Event befalls” (al-Wāqiʿah), “By those sent forth in succession” (al-Mursalāt), “About what are they asking one another?” (al-Nabaʾ), “When the sun is folded up” (al-Takwīr), the two protective surahs (al-Muʿawwidhatayn), and “Say: He is Allah, One” (al-Ikhlāṣ). Then he said: “Present your need to us, O Hām, and do not neglect visiting us.”
ʿUmar said: The Messenger of Allah ﷺ passed away, and Hām never returned to us; to this day we do not know whether he is alive or dead.
Al-Bayhaqī added: “Abū Maʿshar is someone from whom the leading scholars have narrated, yet the specialists in ḥadīth consider him weak. This report has also come through another chain that is stronger than his. Allah knows best.”