When the document was brought and the people saw it, then they found that besides the name of Allah Ta‘ala, all the other words had really been eaten by ants. Seeing this, they all lowered their heads in shame and embarrassment. In this manner, the oppressive resolution was finally terminated.
Hence, in the 10th year of prophethood, Abu Taalib and his companions emerged from the valley. Abu Taalib then went to the Haram, held onto the covering of the Holy Ka’bah and made du‘aa with his companions saying, “O Allah! Those who oppressed us, severed ties with us, and subjected us to humiliation – You take revenge from them on our behalf!”
Abu Taalib also composed some poetry in this regard. One of the verses of his poem is as follows:
ألم يأتكم أن الصحيفة مزقت وأن كل ما لم يرضه الله يفسد
Do you not know that the document was torn apart, and that everything which is displeasing to Allah Ta‘ala is destroyed in this manner?
Haafiz Ibnu Katheer (rahimahullah) mentions, “It was during this period, when Rasulullah (sallallahu ‘alaihi wasallam) and the Banu Haashim were under boycott in the Valley of Abu Taalib, that Abu Taalib composed his famous poetry known as the Qaseedah Laamiyyah.”
In this manner, three years of continuous suffering came to an end, and in the 10th year of prophethood, three years before hijrah, the Muslims emerged from the Valley of Abu Taalib.
(Extracted from Seeratul Mustafa 1/268)