A cannabinoid receptor modulator containing a compound represented by Formula (I
0
)
wherein, X is an oxygen atom, etc., R
0
is an optionally substituted acylamino group, ring A
0
is a benzene ring which may further have a substituent in addition to R
0
, and ring B is an optionally substituted 5-membered heterocycle, or a salt thereof or a prodrug thereof.
Provided are compounds that are useful in the treatment and/or prevention of diseases mediated by deficient levels of glucokinase activity, such as diabetes mellitus. Also provided are methods of treating or preventing diseases and disorders characterized by underactivity of glucokinase or which can be treated by activating glucokinase.