Medieval polemicists branded Muhammad a lifelong idolator unworthy of prophecy

Evidence

Muhammad; mentioned his father’s name as ‘Habedileth, that is, slave of the idol Leth’; imagined the Christian Bahira’s exhorting him to ‘fly the worship of idols’; suspected a wish to compromise with paganism and with magic. The reprobatio stressed that Muhammad committed ‘the sin of idolatry’ until he was forty years old: the Qur’an ‘says that God found Muhammad in error - that is, in error about the laws of God — and directed him’; this seemed sufficiently important to seek corroboration in Bukhari. The Devil, said Ricoldo in his turn, chose for his purposes an idolator; Ricoldo thought it inconsistent to claim to be a great prophet, after spending a pagan youth. — Norman Daniel, Islam and the West, 469