Disclosed are fused heterocyclic carboxamide compounds of formula (I) that are inhibitors of phosphodiesterase type 10A, wherein the variables are as defined in the specification. These inhibitors of phosphodiesterase type 10A are used for the manufacture of a medicament for treating or controlling of medical disorders selected from neurological disorders and psychiatric disorders, for ameliorating the symptoms associated with such disorders and for reducing the risk of such disorders.