The present invention provides a novel thiazolederivative useful as a VAP-1 inhibitor, a pharmaceuticalagent for the prophylaxis or treatment of VAP-1 associateddiseases and the like. A compound represented bythe formula (I): wherein each symbol is as defined in thespecification, or a pharmaceutically acceptable salt thereof.