The origins of Shia Islam in Bahrain can be traced back to 656-661 AD, the caliphate reign of Ali ibn Abi Talib. The prophet Muhammed appointed Aban Ibn Sa'id Al As () as governor of Bahrain during his lifetime. Aban was a major supporter of Ali's right to the caliphate, a position that was endorsed by the inhabitants of Bahrain including the influential Bani Abdul Qays tribe. The Khamis Mosque is believed to be the oldest mosque in Bahrain, with its origin dating back to the reign of Caliph Umar II.