Migrations to Abyssinia, 615
Being the first man to go over to Islam, Abu Bakr had brought upon himself the special anger and hatred of the Meccan chiefs. Soon he felt hard pressed and asked permission of the Holy Prophet to go to Abyssinia. The permission was granted and Abu Bakr set off on his journey. However, on the way he met Ibn-ud-Daghinna, the chief of Qara. Under Ibn-ud-Daghinna's protection, he soon came back to Makkah.
Wager with Quraysh
During the Roman-Persian Wars, the sympathies of the Quraysh of Mecca was with the Persians who were Zoroastrian. The Muslims on the other hand had their sympathies for the Byzantines who were Christians and were People of the Book with a belief in the Abrahamic God.
The Persians inflicted a humiliating defeat over Byzantine Romans capturing the Holy Cross of the Romans and later even went to lay siege to Constantinople, the capital of the Byzantine empire (Siege of Constantinople (626)). Verses of the Qur'an were revealed Surah rum with the prophecy that Byzantine (Romans) will regain what they lost and the Persians will be defeated within few years.
Surah Ar-Rum (verses 1 to 7) of the Quran "(1)The Roman Empire has been defeated― (2) In a land close by; but they, (even) after (this) defeat of theirs, will soon be victorious (3) Within a few years. With Allah is the Decision, in the Past and in the Future: on that Day shall the Believers rejoice― (4) With the help of Allah. He helps whom He will, and He is Exalted in Might, Most Merciful. (5) (It is) the promise of Allah. Never does Allah depart from His promise: but most men understand not. (6) They know but the outer (things) in the life of this world: but of the End of things they are heedless. (7) Do they not reflect in their own minds? Not but for just ends and for a term appointed, did Allah create the heavens and the earth, and all between them: yet are there truly many among men who deny the meeting with their Lord (at the Resurrection)! "
Over this Abu Bakr had a wager with Ubaiy bin Khalf, it was decided that one who lost the wager will pay one hundred camels. With a decisive Byzantine (roman)) victory in 627 against the Persians, Abu Bakr won the wager. Although Ubaiy bin Khalf was not alive his heirs honored the agreement and gave Abu Bakr one hundred camels. Abu Bakr gave away all the camels as charity.
Last years in Mecca
In 617, the Quraysh enforced a boycott against the Banu Hashim. Muhammad along with his supporters from Banu Hashim, were shut up in a pass away from Mecca. All social relations with the Banu Hashim were cut off and their state was that of imprisonment. Before it many Muslims migrated to Abyssinia (now Ethiopia). Abu Bakr, feeling distressed, set out for Yemen and then to Abyssinia from there. He met a friend of his named Ad-Dughna (chief of the Qarah tribe) outside Mecca, who invited Abu Bakr to seek his protection against the Quraysh. Abu Bakr went back to Mecca, it was a relief for him, but soon due to the pressure of Quraysh, Ad-Dughna was forced to renounce his protection. Once again the Quraysh were free to persecute Abu Bakr.
In 620 Muhammad's wife and uncle died. Abu Bakr's daughter Aisha was engaged to Muhammad, however it was decided that the actual marriage ceremony would be held later. In 620 Abu Bakr was the first person to testify to Muhammad's Isra and Mi'raj (night Journey).
Migration to Medina
In 622, on the invitation of the Muslims of Medina, Muhammad ordered Muslims to migrate to Medina. The migration began in batches. Ali was the last to remain in Mecca, entrusted with responsibility for settling any loans the Muslims had taken, and famously slept in the bed of Muhammad when the Quraysh led by Ikrima attempted to murder Muhammad as he slept. Meanwhile Abu Bakr accompanied Muhammad in his migration for Medina. Due to the danger of the Quraysh, they did not take the road to Medina. They moved in the opposite direction, and took refuge in a cave in Jabal Thawr some five miles south of Mecca. `Abdullah ibn Abi Bakr, the son of Abu Bakr, would listen to the plans and talks of the Quraysh, and at night he would carry the news to the fugitives in the cave. Asma bint Abi Bakr, the daughter of Abu Bakr, brought them meals every day. Aamir, a servant of Abu Bakr, would bring a flock of goats to the mouth of the cave every night where they were milked. The Quraysh sent search parties in all directions. One party came close to the entrance to the cave, but was unable to sight them. Due to this the following verse of the Qur'an was revealed:
If ye help not (your Leader) (it is no matter): for Allah did indeed help him; when the unbelievers drove him out: he had no more than one companion: they two were in the cave, and he said to his companion "Have no Fear, for Allah is with us": then Allah sent down His peace upon him, and strengthened him with forces which ye saw not, and humbled to the depths the word of the Unbelievers. But the word of Allah is exalted to the heights: for Allah is Exalted in might, Wise. (Qur'an 9:40)
'Aa'ishah, Abu Sa`eed al-Khudri and ibn 'Abbaas in interpreting this verse said
Abu Bakr was the one who stayed with the Prophet in that cave
It is narrated from al-Barra' ibn 'Azib, he said,
Once Abu Bakr bought a ride from 'Azib for 10 Dirham, then Abu Bakr said to 'Azib, "Tell your son the Barra to deliver that beast." Then 'Azib said, "No, until you tell us about your journey with the Messenger of Allah when he went out of Makkah while the Mushrikeen were busy looking for you." Abu Bakr said, "We set out from Makkah, walking day and night, until it came the time of Zuhr, so I was looking for a place so that we can rest under it, it came to be that I saw a big rock, so I came to it and there was the place, so I spread a matress for the Prophet, then I said to him, " Rest O' Prophet of Allah." So he rested, while I surveyed the area around me, are there people looking for us coming here to spy... Suddenly I saw there was a shepherd herding his sheep to the direction of the place under the rock wanting to shade himself like us, so I asked, "Who is your master O' slave?" He answered, "Slave of the fulan, someone of the Quraish." He mentioned the name of his master and I knew him, then I asked, "Does your sheep have milk?" He answered, "Yes!" So he took one of the sheep, after that I ordered him to clean the breasts of the sheep first from dirt and dust, then I ordered him to blow his hand from dust, so he pat his two hands and he started milking, while I prepared a vessel with its mouth wrapped with cloth to contain the milk, so I poured the milk that was milked to the vessel and I waited until the bottom was cold, then I brought to the Prophet and it was that he had waken up, instantly I told him, "Drink O' Messenger of Allah." So he started to drink until I saw that he was full, then I told him, "Are we not going to continue walking O' Messenger of Allah?" He answered, "Yes!" At last we continued the journey while the mushrikeen kept looking for us, not that could pursue us except Suraqah ibn Malik ibn Ju'sham who rode his horse, so I said to the Messenger of Allah, "This man has succeeded in pursuing us O' Messenger of Allah," but he answered, "ﻻ ﺗﺤﺰ ﻥ ﺇ ﻥ ﺍﷲ ﻣﻌﻨﺎ" (Do not worry, verily Allah is with us).
It is narrated from Anas from Abu Bakr he said,
I said to the Prophet when were in the cave, "If only they had looked under their feet we would assuredly be seen" The Messenger answered, "ﻣﺎ ﻇﻨﻚ ﻳﺎ ﺃ ﺑﺎ ﺑﻜﺮ ﺑﺎ ﺛﻨﻴﻦ ﺍﷲ ﺛﺎ ﻟﺘﻬﻤﺎ" (What do you think O' Abu Bakr about two people if Allah is the third, meaning God was with them.)
After staying at the cave for three days and three nights, Abu Bakr and Muhammad proceed to Medina, staying for some time at Quba, a suburb of Medina. While Sunni sources portray Abu bakr in an exalted light in the cave, Shia sources however generally tend to portray the incident in the cave as a Quranic condemndation of Abu Bakr for cowardice and fear.