The present invention provides a novel hetero ring compound containing nitrogen represented by the formula (Ⅰ), a salt thereof and an N-oxide compound, and an agricultural and horticultural fungicide containing at least one selected from the above compounds or salts as an active ingredient. In the formula (Ⅰ), R represents a group represented by CR1R2R3or a cyano group. R1to R3represent a hydrogen atom, an unsubstituted or substituted C1 to C8 alkyl group, an unsubstituted or substituted hydroxyl group, or the like. R4or R5represents a halogeno group, or the like. Y to Z represents a carbon atom, or the like, A or D represents a benzene ring, or the like. X represents an oxygen atom, a nitrogen atom, or the like.本發明提供一種式(I)所示之新穎含氮雜環化合物及其鹽或N-氧化物化合物以及含有選自該等中之至少一種作為有效成分之農園藝用殺菌劑。於式(I)中,R表示CR1R2R3所示之基或氰基。R1~R3分別獨立表示氫原子、未經取代或具有取代基之C1~8烷基、未經取代或具有取代基之羥基等。R4或R5表示鹵基(halogeno group)等。Y或Z表示碳原子等,A或D表示苯環等。X表示氧原子或氮原子等。