Provided is a compound represented by formula (I), or an N-oxide thereof:wherein: A1 represents a nitrogen atom or a CR4; R4 represents a hydrogen atom or the like; R1 represents a C2-C10 chain hydrocarbon group having one or more halogen atoms or the like; R2 represents a C1-C6 alkyl group optionally having one or more halogen atoms or the like; q represents 0, 1, 2, or 3; R3 represents a C1-C6 chain hydrocarbon group optionally having one or more substituents selected from Group B or the like; p represents 0, 1, or 2; R6 represents a C1-C6 alkyl group optionally having one or more halogen atoms or the like; and n represents 0, 1, or 2. The compound of formula (I) has excellent control efficacies against harmful arthropods.