Compounds having the formula (I), ##STR00001## or a stereoisomer or
pharmaceutically-acceptable salt, or hydrate thereof, are useful as
factor VIIa inhibitors, wherein X is --NR.sub.6S(O).sub.pR.sub.16; W is
hydrogen or --(CR.sub.7R.sub.8).sub.q--W.sub.1; W.sub.1 is hydrogen or a
bond with R.sub.6; Z is a 5-membered heteroaryl group, a five to six
membered heterocyclo or cycloalkyl group, a 9 to 10 membered bicyclic
aryl or heteroaryl, or a six membered aryl or heteroaryl, and R.sub.1,
R.sub.2, R.sub.3, R.sub.6, R.sub.7, and R.sub.16 are as defined in the
specification.