This invention relates to a novel compound represented by the formula (I):
##STR00001## or a pharmaceutically acceptable salt thereof, wherein
R.sup.1 is --S(O)p-A, --S--(O)q-B or --O-D, wherein p and q, which are
the same or different, each represent an integer from 0 to 2, A is a
straight chain C1-C10 alkyl group which may be substituted by R.sup.10,
and B and D each independently represent R.sup.12 which may be
substituted by R.sup.10; R.sup.2 is a hydrogen atom, a halogen atom, or a
straight chain or branched C1-C6 alkyl group which may be substituted by
R.sup.10; X.sup.1 and X.sup.2 each independently represent N or CH, but
cannot both be N; the formula (II): ##STR00002## shows a monocyclic or
bicyclic heteroaryl group which has a nitrogen atom adjacent to the
carbon atom bonded to the amide group, and the heteroaryl group may be
substituted by R.sup.10; R.sup.10 is R.sup.11, or a hydrocarbon group
which may be substituted by R.sup.11; R.sup.11 is, for example, a
hydrogen atom or amino; and R.sup.12 is, for example, phenyl, thiazolyl,
pyridyl or methylene dioxyphenyl. The compound according to this
invention has a glucokinase activation effect, and for example, is useful
in the treatment and prevention of diabetes mellitus, and in the
prevention of its complications such as diabetic nephropathy, diabetic
retinopathy, diabetic neuropathy and diabetic arteriosclerosis.