Provision of a novel amidine derivative or a pharmaceutically acceptable salt thereof having an activated blood coagulation factor X-inhibitory activity. A compound represented by the formula (I)
wherein each symbol is as defined above, or a pharmaceutically acceptable salt thereof.