In flowering plants, flower organ identity is controlled by the ABC genes, including several MADS box genes. We present two MADS box genes of a conifer, Cryptomeria japonica D, Don, The genes, CjMADS1 and CjMADS2, were related to the angiosperm B function genes which determine the identities of petals and stamens. A phylogenetic analysis showed that these genes form a new clade outside the angiosperm B group, that is, PISTILLATA (PI) and APETALA3 (AP3) lineages. CjMADS1 had a PI-group specific motif and CjMADS2 had AP3-group specific motifs at the C terminal end, respectively. CjMADS1 was expressed in male strobili (or cones) throughout its development, while CjMADS2 was transiently expressed during male strobilus development. The specific expression in the male reproductive organ indicated that the B function is maintained in gymnosperms, Our cladistic analysis suggests that the gene duplication event which generated B function gene lineages predates the divergence of angiosperms and gymnosperms and that the gene duplication which produced the two genes of C. japonica occurred in an ancestral conifer species.