It is reported that Al-Ḥasan Al-Baṣrī – 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 Muḥammad – 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 Faḍlihi article 905.