An agricultural or horticultural fungicide contains as an active ingredient thereof at least one compound selected from the group consisting of nitrogenated heterocyclic compounds represented by formula (I) (wherein, R represents a group represented by CR 1 R 2 R 3 or a cyano group, R 1 to R 3 represent hydrogen atoms, alkyl groups or hydroxyl groups, or the like, X 1 represents a halogeno group or the like, m represents an integer of 0 to 5, X 2 represents a halogeno group or the like, n represents an integer of 0 to 3, B represents a carbon atom or a nitrogen atom, D represents a 5- to 7-membered hydrocarbon ring, and A 1 to A 4 represent carbon atoms or nitrogen atoms, provided that A 1 to A 4 do not all represent carbon atoms when B represents a carbon atom) and salts thereof.농원예용 살균제는 식 (I) (식 중, R 은 CR1R2R3 으로 나타내는 기 또는 시아노기를 나타내고, R1 ∼ R3 은 수소 원자, 알킬기, 수산기 등을 나타내고, X1 은 할로게노기 등을 나타내고, m 은 0 ∼ 5 중 어느 정수이고, X2 는 할로게노기 등을 나타내고, n 은 0 ∼ 3 중 어느 정수이고, B 는 탄소 원자 또는 질소 원자를 나타내고, D 는 5 ∼ 7 원자 탄화수소 고리를 나타내고, A1 ∼ A4 는 탄소 원자 또는 질소 원자를 나타내지만, B 가 탄소 원자인 경우, A1 ∼ A4 모두가 탄소 원자인 경우는 없다) 로 나타내는 함질소 헤테로 고리 화합물 및 그 염으로부터 선택되는 적어도 1 종을 유효 성분으로서 함유한다.