The situation changed, especially after Allah (Glorified is He) had strengthened Islam and the Muslims with Umar and Hamzah (may Allah be pleased with them) embracing Islam, and the Muslims were then able to clearly pray in the sacred precincts with their Companions Umar and Hamzah.
Quraysh also realized that the Messenger of Allah’s Companions had moved to another country where they were safe with An-Najashi’s protection. Moreover, Islam started to spread among the different tribes.
At that point in time, Quraysh decided to all agree together upon a course of action. Therefore, they gathered together to write a pact with regards to Banu Hashim and Banu Al-Muttalib to not marry their sons and daughters, to not sell to them, to not mix with them, and never accept any form of reconciliation from them; they would not deal with them kindly at all until they gave the Messenger of Allah (peace be upon him) to Quraysh for them to kill him.
They wrote this pact on some parchment which they then hung inside the Kaaba. They forced the Messenger of Allah (peace be upon him) and those with him to flee to the valley of Abu Talib, where they were confined by Quraysh. This started on the first night of the month of Muharrem, in the seventh year of the call. The parchment was hung inside the Kaaba, and the Muslims and those with them remained confined and tightly surrounded, being very restricted and not even being able to obtain essential food for a period of three years [Adapted from The Provision of the Traveller: The Guidance of the Best Slave].