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 C alkyl group; R is a hydrogen atom, a C alkyl group, a C cycloalkyl group or a substituent having the structure represented by the following formula Ia or Ib: (Ia) (Ib) where R is a C alkyl group; R is a C alkyl group, a C cycloalkyl group, or a benzyl group; and R is a hydrogen atom or a substituent having the structure represented by the following formula Ic or Id:(Ic) (Id)