According to historical sources, the Mosque's area is one of the places where the Prophet (PBUH) prayed in Al-Musalla square. It was named after Ali Ibn Abu Talib (may Allah be pleased with him) because he led Eid Al-Adha prayers in the same location in 35 AH, during the caliphate of Othman Ibn Affan (may Allah be pleased with him). The mosque was likely constructed when Omar bin Abdulaziz ruled Madinah during the Umayyad era (87-93 AH). In 881 AH, Zain Ad-Din Al-Mansouri, the Emir of Madinah, rebuilt it after its destruction. The current structure of the Mosque dates back to the reign of King Fahd bin Abdulaziz Al Saud, Custodian of the Two Holy Mosques. In 1411 AH, the mosque was reconstructed and expanded, also restored and maintained during the reign of King Abdullah bin Abdulaziz in 1434 AH. Finally, it underwent maintenance during the reign of King Salman bin Abdulaziz as part of Madinah's mosques and historic sites care project.
From the Prophet's Prayer to Ali's Prayer:
The mosque is built on the site of one of the Prophet's prayer grounds in Al-Manakhah area, where the Prophet (ﷺ) used to lead Muslims in Eid and rain-invoking prayers. Ali ibn Abi Talib, may Allah be pleased with him, used to lead the Muslims in Eid prayers in this spot during his reign.
Ali's Eid Prayer Ground:
The Prophet (ﷺ) made Al-Manakhah area a ground for offering Eid and rain-invoking prayers, praying in several spots of the place. When Ali became caliph, he used to lead Eid prayers in one of those spots in which the Prophet used to pray within Al-Manakhah area. Later on, a mosque bearing Ali's name was built on this site.
The mosque is located to the north of Al-Ghamamah Mosque. It is 290 meters away from the building of the second Saudi expansion of the Prophet’s Mosque. It isnext to Abu Bakr Al-Siddiq Mosque, the two mosques being approximately 100 meters apart.
History:
The mosque was built by Omar ibn Abdulaziz, may Allah have mercy on him, during his tenure as governor of Madinah (87-93AH). Omar identified the prophetic prayer grounds in Madinah, and built mosques on their sites before they were forgotten. The mosque received much attention from the governors of Madinah in various eras, and was restored several times. The kings of the Saudi State played a leading role in preserving the mosque. During the reign of King Salman ibn Abdulaziz, the mosque received more attention as it was listed in the Historical Islamic Sites Development and Rehabilitation Project.
Architectural Design:
The three historical mosques in Al-Manakhah Square share the same style. Ali ibn Abi Talib Mosque is rectangular in shape. It is 31 meters long, extending from east to west, and is 22 meters wide. It consists of one hall, covered with seven domes, the highest of which is the one on top of the mihrab. From the northern side, it opens up to an unroofed rectangular courtyard. The mosque minaret is on the eastern side.