Manichaeism was a religion which thrived between the third and seventh centuries, and at its height was one of the most widespread religions in the world. Briefly the main rival to Christianity before the spread of Islam in the competition to replace classical paganism.