Compounds of Formula (I), including pharmaceutically acceptable salts of the compounds, are CETP inhibitors, and are useful for raising HDL-cholesterol, reducing LDL-cholesterol, and for treating or preventing atherosclerosis. In the compounds of Formula (I), A1 is a cyclic group, and B is a cyclic group which is attached to the heterocyclic ring directly or through a methylene group.