A heterocyclic compound represented by general formula (I)[wherein R1 represents an optionally protected amino group, or an optionally substituted C1-6 alkyl group R2 and R3 independently represent a C1-2 alkyl group X represents a hydrogen atom, or a halogen atom Z1 represents C-R4 (wherein R4 represents a hydrogen atom, a halogen atom, an optionally protected amino group, or a C1-6 alkylsulfonyl group), or N Z2 represents C-R5 (wherein, R5 represents a hydrogen atom, a hydrogen atom, a halogen atom, an optionally protected amino group, or a C1-6 alkylsulfonyl group), or N Z3 represents C-R6 (wherein R6 represents a hydrogen atom, a hydrogen atom, a halogen atom, an optionally protected amino group, or a C1-6 alkylsulfonyl group ), or N Z4 represents C-R7 (wherein, R7 represents a hydrogen atom, a hydrogen atom, a halogen atom, an optionally protected amino group, or a C1-6 alkylsulfonyl group), or N Z represents CH or N and A represents a methylene group, or a bond] or a salt thereof, which has an excellent anti-HIV activity and is thereof useful as an anti-HIV agent.