Imam al-Hasan al-Basri ~ May Allah 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 Allah in a way that does not harm your seeking of knowledge.
For verily, there were people {the Khawarij} who sought to worship Allah but abandoned knowledge until they attacked the Ummah of the Prophet Muhammad ~ peace and blessings of Allah be upon him ~ with their swords.
But if they had sought knowledge, it would not have directed them to do what they did. ”
{Related by Hafiz Yusuf Ibn ‘Abd Al-Barr, Jami’ Bayan Al-’Ilm wa Fadlihi}