It is reported that Al-Hasan Al-Basrî – Allâh have mercy on him – said:
One who acts without knowledge is like one who travels off the path; and the one who acts without knowledge corrupts more than he rectifies. So seek knowledge in a way that does not harm your worship, and seek to worship [Allâh] in a way that does not harm [your seeking of] knowledge. For verily, there were people (the Khawârij extremists) who sought to worship [Allâh] but abandoned knowledge until they attacked the Ummah of Muhammad – Allâh’s praise and peace be upon him – with their swords. But if they had sought knowledge, it would not have directed them to do what they did.
Quoted by Ibn ‘Abd Al-Barr, Jâmi’ Bayân Al-‘Ilm wa Fadlihi article 905.