The present invention is related to novel substituted thiazoles and oxazoles compounds of the following formula (I) having P2X7 receptor (P2X7) antagonistic properties: The compounds are useful in the treatment or prophylaxis of diseases associated with P2X7 receptor activity.