Compounds represented by formula (I):wherein each symbol is as defined in the description, and pharmaceutically acceptable salts thereof are useful as hyperglycemic inhibitors having a serine protease inhibitory action and as prophylactic or therapeutic drugs for diabetes.