Fused heterocyclic compounds of formula (1):(G1 and G2 represent a nitrogen atom or the like, A1 and A2 represent a nitrogen atom or the like, A3 represents —NR8— or the like, A4 and A5 represent a nitrogen atom or the like, R1 represents a C1-C6 chain hydrocarbon group or the like optionally having one or more atoms or groups selected from a group X, R2 and R3 are the same or different and represent a C1-C6 chain hydrocarbon group or the like optionally having one or more atoms or groups selected from the group X, R8 represents a C1-C6 chain hydrocarbon group or the like optionally having one or more atoms or groups selected from a group W, and n represents 0, 1 or 2), or N-oxides thereof are described. The disclosed compounds are very effective for pest control.