The present invention provides a heterocyclic compound that exhibits a superior control against harmful arthropods and that is represented by formula (I): (I) [in the formula, Q1 represents an oxygen atom or the like; Q2 represents an oxygen atom or the like; T represents a C1-C10 chain hydrocarbon group or the like, having one or more halogen atoms; A1 represents a nitrogen atom or the like; A2 represents a nitrogen atom or the like; A3 represents a nitrogen atom or the like; A4 represents a nitrogen atom or the like; R2 represents a cyclopropyl group or the like; R3 represents a C1-C6 chain hydrocarbon group or the like that may have one or more substituents selected from a group B; n is 1 or 2; and q is 0, 1, 2, or 3], and also provides a composition containing said compound and one or more types of components selected from a group including a group (a), a group (b), a group (c), and a group (d) described in the specification.