The invention relates to heterocyclic derivatives of formula I as well as their pharmaceutically acceptable salts. The invention further relates to a process for the preparation of such compounds. The compounds of the invention are mGluR5 modulators and are therefore useful for the control and prevention of acute and/or chronic neurological disorders.