Ali ibn Abi Talib (Arabic: عَلِي ابْن أَبِي طَالِب, romanized: ʿAlī ibn Abī Ṭālib; 13 September 601 – 29 January 661) was the cousin and son-in-law of Muhammad, the last prophet of Islam. He ruled as the fourth caliph from 656 to 661, but is regarded as the rightful immediate successor to Muhammad as an Imam by Shia Muslims. Ali was born inside the sacred sanctuary of the Kaaba in Mecca, the holiest place in Islam, to Abu Talib and Fatimah bint Asad. He was the first male who accepted Islam. Ali protected Muhammad from an early age and took part in almost all the battles fought by the nascent Muslim community.