The present invention provides thienopyridine derivatives, which are useful as anti-inflammatory drugs, particularly as remedies for arthritis; processes for producing them, and pharmaceutical compositions containing them. The thienopyridine derivatives are represented by the formula (I):wherein G is a halogen atom, hydroxyl group, an optionally substituted amino group, etc.; alk is an optionally substituted lower alkylene group; X is O, S, -(CH2)q-, etc.; R is an optionally substituted amino group, etc.; ring B is an optionally substituted Y-containing 5- to 8-membered ring whose ring constituent atoms contain no nitrogen atom; Y is O, S, a group of(wherein Ra, Rb and Rc are the same or different and, each is H, a halogen atom, an optionally substituted hydrocarbon group, etc.), etc.; and ring A may be substituted.