After the pledge of Aqaba, the Muslims were much hopeful that Medina will be the place where they will be able to live their life with peace. When our Holy Prophet Muhammad (Peace be upon him) migrated to Medina, he was accepted as a leader as it was already discussed with the people of Medina at the pledge of Aqaba. He made every migrated person brother of the resident of Medina. That policy of being closed favored them a lot and their strength increased a lot.
In the 6th year of Hijri, a treaty was signed between the Muslim od Medina and the people of Mecca. According to this treaty, the Muslims will not be allowed to enter in Mecca this year. They will come for the pilgrimage next year but will not stay for more than three days. It is also essential for the Muslims to come unarmed (only covered swords were allowed). There will be no war between both parties. Both parties will avoid disputes between each other. It was also included if a person from Mecca will join the Muslims in Medina, he will be returned while if any Muslim from Medina will join the people of Mecca, he will not be returned.
When this agreement was being written, Abu Jandal, who has accepted Islam, ask the Muslims for shelter. Till then the agreement was not signed but our Holy Prophet Muhammad (Peace be upon him) returned Abu Jandal to the people of Mecca and ask him to face the situation with patience. Returning a person to the people of Mecca before signing an agreement is a great sign of good ethics showed by our Holy Prophet Muhammad (Peace be upon him).
Due to that agreement, our Holy Prophet Muhammad (Peace be upon him) stopped the war which was expected to happen.
It was the 7th year of Hijri when our Holy Prophet Muhammad (Peace be upon him) decided to send the letters to the rulers of different states. Some of them accepted while some refused with thanks while some rejected with disgrace. The Roman empire was the superpower of the time. Egypt was also a great power. Hercules was the ruler of the Roman empire. He didn’t accept Islam but behaved very politely with the ambassador. The same was done by the ruler of Egypt. The ruler of the Persian empire, Khusro Pervaiz rejected the offer to accept Islam and disgraced the ambassador. While on the other hand, the ruler of Abyssinia, Negus (Nijashi), the ruler of Bahrain, Mandhir and the ruler of Oman, Jaffar accepted the offer to embrace Islam.