Ali's rule over the early Muslim community was often contested, and wars were waged against him. As a result, he had to struggle to maintain his power against the groups who betrayed him after giving allegiance to his succession, or those who wished to take his position. This dispute eventually led to the First Fitna, which was the first major civil war within the Islamic Caliphate. The Fitna began as a series of revolts fought against Ali ibn Abi Talib, caused by the assassination of his political predecessor, Uthman ibn Affan. While the rebels who accused Uthman of prejudice affirmed Ali's "khilafa" (caliph-hood), they later turned against him and fought him. Ali ruled from 656 CE to 661 CE, when he was assassinated while prostrating in prayer ("sujud"). Ali's main rival Muawiyah then claimed the caliphate.