The present invention provides compounds having superior TAFIa inhibitory activity. They are dihydroimidazoquinoline compounds represented by the following formula (I) or pharmaceutically acceptable salts thereof: (I) wherein R is a hydrogen atom or a C1-10 alkyl group; R1 is a hydrogen atom, a C1-10 alkyl group, a C3-8 cycloalkyl group or a substituent having the structure represented by the following formula Ia or Ib: (Ia) (Ib) where R3 is a C1-6 alkyl group; R4 is a C1-6 alkyl group, a C3-8 cycloalkyl group, or a benzyl group; and R2 is a hydrogen atom or a substituent having the structure represented by the following formula Ic or Id:(Ic) (Id)