The birth of Imam Ali took place under unique circumstances inside the holy Ka'ba. It is considered unique because no prophet or saint has ever been bom in a holy sanctuary.
Fatima binte Asad, the expectant mother of Ali was praying outside the Ka'ba when she suddenly felt the labor pains. Just then the wall of the holy sanctuary opened. As she stepped in, the wall closed behind her. Shortly after that she gave birth to her baby. When they came out, Muhammad took the newborn in his arms and named him Ali. The infant looked at his face and smiled.
Muhammad nurtured Ali in his childhood, and the child fully assimilated the habits and the qualities of the Prophet. When he grew up, Ali accompanied Muhammad wherever he went, and followed him like his shadow. This early association blossomed in his devout love for the Prophet whom he emulated in every manner, and assisted him in the delivery of the Message at every step. The association between the two was not accidental. Muhammad himself was born in the Shabe Abi Talib (the house of Abu Talib just out side Makkah) and was raised and nurtured by Ali's parents, Abu Talib and
Fatima binte Asad. Abu Talib took special care of his nephew Muhammad, and protected him against all odds as long as he lived.
Ali came into focus as a young lad of about I I years when he became known as one the first to witness Muhammad as Allah's Messenger. The other person to acknowledge the Prophetic mission of Muhammad was his wife Khadija.
Now that Muhammad was commanded by Allah to proclaim his Prophet-hood and invite his kinsmen to Islam, he asked Ali to act as his messenger. Ali called on the elders of Quraish to extend the Prophet's invitation. He and his father arranged a feast known as dhil-Asheera. The Prophet delivered the Message, asking them to forsake the idols and worship Allah alone. In the face of great hostilities, when he asked if any one would help him in his work, none other than Ali stood up and declared his unconditional and unfettered support of the Prophetic Mission.
The Quraish of Makkah unleashed their torment to the early believers, but the Prophet continued to convey the Message undaunted by the insults and the harsh treatment of the Makkans. All protected and defended the Prophet at every opportunity despite his young age. Along with handful of the early believers, Ali endured the harsh economic and social blockade of his parent's house by the arrogant Quraish when the Prophet refused to abandon his mission.
On the night of Hijra, when the enemies of the Prophet were lying in wait for him, he willingly and gratefully undertook the hazardous task of sleeping in the bed of the Prophet so that the Messenger of Islam would not be hurt. It helped the Prophet escape the assassins in the darkness of the night. Allah recognized this service of Ali in the Qur'an: “And there is the type of man who gives his life to earn the pleasure of Allah; and Allah is full of kindness to (His) devotees." 11: 207.