I say: What appears more likely is that Abū Ṭālib composed his Lāmiyyah ode—the one we cited earlier—only after they had entered the mountain pass; mentioning it here is therefore more fitting. Allah knows best.
Al-Bayhaqī then narrated (1) through the route of Yūnus, from Muḥammad ibn Isḥāq, who said:
When the Messenger of Allah—peace and blessings be upon him—continued upon the mission for which he had been sent, [and Banū Hāshim and Banū al-Muṭṭalib rallied to his side, refusing to surrender him—though they did not share his religion—out of disdain for being humiliated by handing over their kinsman to those who had abandoned him, and when Quraysh realized, because of this stand by Banū Hāshim and Banū al-Muṭṭalib, that there was no way to reach Muḥammad, they resolved] (2) to draw up among themselves a pact against Banū Hāshim and Banū ʿAbd al-Muṭṭalib: that they would neither contract marriage with them nor allow them to marry, would neither buy from them nor sell to them. They wrote a document to that effect and suspended it in the Kaʿbah. They then pounced on those who had embraced Islam, binding them and tormenting them, so that the affliction intensified, the trial became severe, and they were shaken with a violent shaking.
He went on to relate the episode in full: their confinement in the mountain pass of Abū Ṭālib, the extreme hardship they endured—until the cries of their children, wailing from hunger, could be heard outside the pass—so much so that the majority of Quraysh came to detest what had befallen them and openly expressed their aversion to that tyrannical scroll. He also mentioned (3) that, by His mercy, Allah sent termites upon the Qurayshite document; they consumed every mention of Allah’s name in it, leaving intact only the words of injustice, severing of kinship, and falsehood. Allah, exalted is He, informed the Messenger of Allah—peace and blessings be upon him—of this, and he told his uncle Abū Ṭālib. Thereafter he continued the remainder of the story in the manner related by Mūsā ibn ʿUqbah and completed it.
Ibn Hishām likewise reported (4), through Zayd from Muḥammad ibn Isḥāq: When Quraysh saw that the companions of the Messenger of Allah—peace and blessings be upon him—had reached a land where they enjoyed safety and stability, that the Negus protected anyone who sought refuge with him, that ʿUmar had accepted Islam so that he and Ḥamzah now stood with the Messenger of Allah—peace and blessings be upon him—and his followers, and that Islam was spreading throughout the tribes, they gathered and consulted about drafting a pact concerning Banū Hāshim and Banū al-Muṭṭalib (5): that they would neither marry into them nor allow them to marry, would neither sell them anything nor buy from them. They assembled for this purpose, wrote it (6) on a scroll, pledged and covenanted to it, and then hung the scroll inside the Kaʿbah as a binding commitment upon themselves. The scribe of the document was Manṣūr ibn ʿIkrimah ibn ʿĀmir ibn Hāshim ibn ʿAbd Manāf ibn ʿAbd al-Dār ibn Quṣayy.
Ibn Hishām added: It is also said that it was al-Naḍr ibn al-Ḥārith; the Messenger of Allah—peace and blessings be upon him—supplicated against him, and several of his fingers became paralyzed.