The Emigration to Yathrib (Madina)
After the second 'Aqaba pledge to Prophet Muhammad (pbuh), he gave permission to his Companions to immigrate (hijrah) to Yathrib. The first ones to immigrate to this city were Amir ibn Rabia and his wife Leila bint Hasma; then the other companions began to leave Mecca in groups. It should be pointed out that there were a few companions who went from Mecca to Medina at earlier dates. These were Abu Salama al-Mahzumi and his wife Ummu Salama, who immigrated to Medina before the Aqabah pledges and Mus'ab ibn Umayr and Abdullah ibn Ummu Maktum, who were sent by the Prophet to Medina after the first Aqabah pledge in order to convey the message of Islam.
Generally the hijrah was performed secretly. This was because the Quraishi idolaters did not want the Muslims to leave Mecca and thus raised various difficulties, attempting to prevent the hijrah and even imprisoning some of the Muslims. For instance, when Abu Salama and his wife Ummu Salama returned to Mecca from Ethiopia and took their son Salama with them to go to Medina for hijrah, Ummu Salama's family did not let her leave. Subsequently, Abu Salama left his wife and son in Mecca and had to go to Mecca by himself. On the other hand, the family of Abu Salama took Salama from his mother in response to the things done by Ummu Salama's family. As a result of the deep sadness caused by the separation from both her husband and son, Ummu Salama shed tears for a year. Finally, her relatives showed mercy and allowed her to go to Medina and Abu Salama's family handed Salama over to his mother. Ummu Salama took her child with her and left Mecca to go to Medina. She reached Quba in the company of Uthman ibn Talha, whom she had met on the road and met Abu Salama there. Hisham ibn As had made preparations for the hijrah, but he was chained and imprisoned by his father, As ibn Wael, and by other idolaters.
Ayyas ibn Abu Rabi'a set out on the journey for hijrah and reached Quba, yet his brothers, Abu Jahil and Harith ibn Hisham, caught him on the way and persuaded him to return back to Mecca by telling him that his mother was in a wretched way due to his leaving, and then they imprisoned him in Mecca. Hisham ibn As and Ayyas ibn Abu Rabi'a escaped from the idolaters and managed to reach Medina in the 7th year of the hijrah (Gregorian 629). The people of Mecca had acquired information that Suhayb ibn Sinan ar-Rumi was going to perform the hijrah, and thus they did not pay back their debts and confiscated his property and personal effects. Suhayb could perform hijrah only after he had left all his wealth to the people of Mecca. At this point, the hijrah of Umar carries great importance. He circumambulated Kaaba and performed the salah twice and then set out on the journey after openly defying the idolaters.
After permission to perform hijrah had been granted most of the companions immigrated to Yathrib over a relatively brief period. Only the Prophet, his family Abu Bakr and his family families, Ali and his mother, and people who did not have the strength to perform the hijrah or who had been prevented from performing the hijrah remained. In the meantime, Abu Bakr repeatedly asked for permission to perform the hijrah from Prophet Muhammad and the Prophet always answered him with the following words: "Don't hurry! Allah Almighty will give you a companion."
Seeing that the Muslims who were performing hijrah to Yathrib were abandoning their houses, possessions and assets for their beliefs, the Quraishi idolaters began to worry that the Prophet might one day go there with his companions and pose a hazard and a threat against them. They gathered in Dar al-Nadwa to discuss what kind of a strategy they should follow. Sending the Prophet into exile or imprisoning him were suggestions that were put forward. On the proposal of Abu Jahil, it was eventually decided that the Prophet should be killed. To avoid a blood feud with the Hashimites, of whom the Prophet was a member, they decided that the Prophet would not be killed by one person, but by a group of people composed of one person from each tribe. The Prophet was informed of this assassination plot through a revelation, and he took action to counteract the attempt. He went to the Abu Bakr's house and began to prepare for hijrah with him. They hired Abdullah ibn Urayqit as a guide to show them the way. Although an idolater, Abdullah ibn Urayqit was a trustworthy and honest man. Abu Bakr gave the two camels that he had allocated for the hijrah beforehand to Abdullah ibn Urayqit and they agreed to meet at the skirts of Mount Thawr in three days time. The Prophet gave Ali the duty of preventing the idolaters from suspecting that he had departed and told him return those things that had been given to him in trust back to their owners. The Prophet and Abu Bakr set out at nighttime. They went to a cave in Mount Thawr and hid there. Abdullah, the son of Abu Bakr, spent his day in Mecca listening to what the Quraishis were saying and plotting about the Prophet and then reported what he had heard to the pair at their hideout under cover of night for three consecutive nights. Also Amr ibn Fuhayra, the shepherd of Abu Bakr's flock of sheep, brought them milk and food by walking his flock through the cave. Amr ibn Fuhayra performed hijrah with them later.
The Quraishi idolaters were surprised when they saw Ali instead of the Prophet in his house. They asked Ali where the Prophet and Abu Bakr were. Ali did not tell their hiding place to idolaters. In response to this they beat Ali, arrested him, but released him later on. The Quraishi idolaters tried to obtain information from Asma, the daughter of Abu Bakr. Abu Jahil tortured Asma when he did not get the answer he wanted. The idolaters did not find the Prophet in Mecca. Realizing that Prophet Muhammad had left Mecca, the idolaters began to search the surroundings and sent messengers to nearby places. One day, they came near Mount Thawr. But on the order of Allah, the cave's entrance was covered with a cobweb. Seeing the cobwebs they thought that nobody could be in there and they turned back. At the moment when the idolaters were in front of the cave's entrance, Abu Bakr became alarmed that the idolaters would find them. The Prophet calmed Abu Bakr saying, "Grieve not; Allah is with us" (Al-Tauba 9/40). As was agreed upon before, Abdullah ibn Urayqit came to Mount Thawr with the camels after three days. They set out from Mount Thawr to Yathrib along the coast. Lest the Quraishi should find them, they took a different path toward their destination, instead of the well-known roads, and sometimes they preferred to go through steep mountain crossings or through the middle of the desert. The Quraishis applied many strategies to find the Prophet. They promised to give 100 camels to any person who could find them, but nobody could. Suraqah ibn Malik, who was a very good tracker, wanted to win the prize of a hundred camels. When the travelers came into sight, he realized he could capture them or kill them, but his horse fell to the ground, as a result of a miracle. Suraqah discontinued his tracking after that. A similar threat was experienced when they passed through the lands of the Aslam tribe. Buraydah ibn Husayb, the chief of the tribe, stooped the convoy. After a short talk with the Prophet, Buraydah ibn Husayb and his tribe accepted Islam and became Muslim. Buraydah accompanied the convoy until they left the lands of his tribe. When they came to the spot called Juhfah, Prophet Muhammad remembered the road to Mecca and felt sad with his longing for the city. In response to this, the following verse was revealed which stated that the Prophet would return to Mecca after defeating his enemies in the city where he experienced cruelty and from which he was forced to perform hijrah (Al-Qasas, 28/85). There were many positive developments during the hijrah. For instance, Abu Bakr and the Prophet stopped at the tent of Umm Mabad Atiqa bint Haled, a woman of Khuzaa, to buy something to eat. She had a ewe, but its udder had dried up owing to the drought. The Prophet wiped the sheep's udder with his hand and mentioning the name of Allah, he prayed that Umm Mabad might have a blessing in her ewe. It then flowed with milk. He gave Umm Mabad and the others the milk to drink first, until all of them were fully satisfied, then he drank knowing everyone was replete. He milked the ewe a second time and when the vessel was full, he left it with Umm Mabad. When Abu Mabad came back and his wife told him about the extraordinary happening and the angelic stranger, she described the Prophet in flowery language. Her remarks are mentioned in the hilya literature and still can be read today so far.
The news about the Prophet's departure from Mecca had already spread fast. The people in Yathrib became worried about Prophet Muhammad as he had not arrived yet. Eagerly expecting his arrival, people would go out after the morning prayer to the outskirts of the city, to Harra, and await his arrival until there was no more shade and the sun became unbearable. They were returning to their homes on the 8th of Rabi' al-awwal (September 20, 622), as they had on previous days, when a Jewish girl on the roof of a three-story house saw the approaching convoy. She realized that this convoy was the Prophet's convoy and she announced their coming by crying out loudly. Upon hearing this, the Muslims rushed to Harra to greet Prophet Muhammad. The Prophet stayed in Qulsum ibn Hidm's house, which was one-hour distance from Yathrib. He stayed in this town for several days, and he built a masjid there. In the meantime, Ali had returned the things to their owners as the Prophet had requested and had left Mecca, hiding by day and traveling by night, finally arriving in Quba and meeting the Prophet there. It is recounted that Ali's mother, Fatima bint Asad, Sawda bint Zam‘a, the wife of the Prophet, their daughters, Fatima and Ummu Qulsum, and Abu Bakr's family also came to Quba. Apart from this, it is stated that the families of the Prophet and Abu Bakr performed hijrah later with Zayd ibn Haritha and Abu Rafi who had come from Medina. The Prophet set out from Quba to Yathrib with his convoy on the 12th of Rabi' al-awwal (September 24, 622), a Friday. The Prophet stopped at the location of the Salim ibn Avf tribe in the Ranuna valley when it was time for the Friday prayer. He read his first Friday khutba (sermon) there and led the prayer. In his sermon he first praised Allah, then Muhammad asserted that people would certainly be judged in the afterlife, that everyone would be held accountable for the people who were working under them, and that nothing could help people after death except for the good deeds that they did on earth. He advised all people to prepare for the afterlife by competing with each other in terms of performing good deeds. The Prophet set out for Yathrib after the prayer, and he was welcomed with great enthusiasm by the people of the city. There was an atmosphere of celebration and festival in Medina, the like of which had never been seen before. People lined up on both sides of the road; men, women and children joyously greeted Prophet Muhammad. All the while, tambourines were being played and the following words were sung: "The moon shone on us from farewell hills / We must thank Allah as long as invitation to Him continues / O Messenger / We shall obey You / Welcome here, our city is honored by your arrival." The Prophet entered the city on his camel, Qaswa, greeting the people and thanking them. Everyone wanted the Prophet to stay in their house, but Muhammad said that he would stay wherever his camel came to rest. The camel came to stop in front of Abu Ayyub al-Ansari's (Khaled ibn Zayd) house. Now the Meccan period, a time of suffering and pain, had come to an end and a new period had begun in Islamic history. Yathrib was now known as Madinat ar-Rasul or al-Madina al-Munavvara, which means the city of the Prophet.
In the sources that relate the events connected to the exodus of Prophet Muhammad from Mecca, his arrival in Quba and his entry into Medina are given different dates. If one carefully examines the accounts, one can understand that the people of Mecca made the decision to assassinate the Prophet on September 9th, 622, a Thursday, that the Prophet learned about this situation, leaving the city and going to the cave of Thawr, that he stayed there from the 10 through 12 September, 622 within the cave, left the cave on Monday Rabi' al-awwal 1, (September 13th, 622) and arrived in Quba, and on Friday, Rabi' al-awwal 12 (September 24th, 622) finally entered Medina.