Pyrazolo[1,5-a]pyrimidine compound, having CB1 receptor-antagonizing activity, of formula [I]:wherein R1 and R2 are the same or different and each is an optionally substituted aryl group, etc.,R0 is hydrogen, an alkyl group, etc.,E is —C(═O)— or —SO2—,R is a group of formula [i], [ii] or [iii], etc:Ring A is a C3-8 cycloalkyl group optionally fused to a benzene ring or a benzene ring, Q is a single bond or a methylene group, Ring B is a 4- to 7-membered aliphatic heterocyclic group, said cyclic group binding via its ring-carbon atom to the adjacent nitrogen atom, X is sulfur atom, etc., R3 is an alkyl group optionally substituted by an alkylthio group, R4 is hydrogen atom, an alkyl group, etc., one of RA and RB is an alkyl group, etc., and the other is hydrogen, an alkyl group, etc.,or a pharmaceutically acceptable salt thereof.