Disclosed are 2-aryl-5-heteroaryl pyridine and pyrimidine derivatives as represented by the general formula (I), wherein R1 is alkyl, cycloalkyl, phenyl, 2-pyridyl, 3-pyridyl, or 4-pyridyl wherein each phenyl, 2-pyridyl, 3-pyridyl, or 4-pyridyl of R1 may be optionally substituted with no more than two of each or a combination of fluoro, hydroxy, -CH2OH, carboxy, carboxymethyl, or carboxyethyl W is a covalent bond, O, S, SO, SO2, CH2, CHOH, or CO Each of U1-U4 is selected from N-R6, O, or S, CR6 or N and wherein the remaining substituents are as defined herein. Representative compounds include 2-(3-fluorophenyl)-4-(2-phenylpyrimidin-5-yl)thiazole, 4-(2-phenylpyrimidin-5-yl)-2-(pyridin-3-yl)thiazole, ethyl 5-(2-phenoxypyrimidin-5-yl)-1H-pyrazole-3-carboxylate, 2-phenyl-5-(2-phenylpyrimidin-5-yl)oxazole, 2-phenoxy-5-(2-(pyridin-3-yl)-1H-imidazol-4-yl)pyrimidine, 2-phenyl-5-(2-phenyl-1H-imidazol-5-yl)pyrimidine. Further disclosed is a pharmaceutical composition which comprises a compound as defined above or a pharmaceutically acceptable salt thereof for treating a disease or condition mediated at least in part by prostaglandin D2 produced by H-PGDS, such as allergic inflammation, asthma or Duchenne muscular dystrophy.