This condensed ring heterocyclic compound or pharmaceutically acceptable salt thereof has a T-type calcium channel regulatory effect and is useful as a drug for the treatment and/or prevention of pruritus, for example. The invention provides a condensed ring heterocyclic compound represented by general formula (I) [in the formula, R1 represents an optionally substituted lower alkyl or the like, R2 represents an optionally substituted lower alkyl or the like, R3 represents formula (II) (in the formula, n represents 0 or 1, R3a represents a hydrogen atom or the like, R3b represents a hydrogen atom or the like, and R3c represents a hydrogen atom or the like) or the like, Q represents a hydrogen atom or the like, W1 represents a nitrogen atom or the like, and W2 represents a nitrogen atom or the like] or a pharmaceutically acceptable salt thereof or the like that has a T-type calcium channel regulatory effect and is useful as, for example, an agent for the treatment and/or prevention of pruritus.本發明之縮環雜環化合物或其藥學上容許之鹽係具有T型鈣離子通道調節作用,可使用作為例如用以治療及/或預防瘙癢之醫藥。根據本發明,提供一種具有T型鈣離子通道調節作用,且作為瘙癢之治療及/或預防劑等有用之下述通式(I)所表示之縮環雜環化合物或其藥學上容許之鹽等,[式中,R1表示可具有取代基之低級烷基等,R2表示可具有取代基之低級烷基等,R3表示式(II)(式中,n表示0或1,R3a表示氫原子等,R3b表示氫原子等,R3c表示氫原子等)等,Q表示氫原子等,W1表示氮原子等,W2表示氮原子等]。