[Problem] To provide a compound which can act relying on an agonistic activity on cannabinoid receptor type 2 and is therefore useful as a novel and excellent prophylactic and/or therapeutic agent for diseases associated with cannabinoid receptor type 2. [Solution] Examination was made on compounds having an agonistic activity on cannabinoid receptor type 2 and it is confirmed that a condensed ring pyridine compound of the invention has an excellent agonistic activity on cannabinoid receptor type 2. This condensed ring pyridine compound has an agonistic activity on cannabinoid receptor type 2 and can be used as a prophylactic and/or therapeutic agent for diseases associated with cannabinoid receptor type 2 such as inflammatory diseases and pain.