To provide a compound having an excellent inhibitory effect on vanilloid receptor subtype 1 (VR1) activity which is effective in treating diseases to which the vanilloid receptor subtype 1 (VR1) activity is involved, such as pain, acute pain, chronic pain, neuropathic pain, rheumatoid arthritis pain, neuralgia, etc. and a pharmaceutical composition containing the compound. The object has been attained by a condensed benzamide compound represented by the following formula (the symbols in the formula have the same meanings defined in the specification) or its salt.