Flower development in angiosperms is regulated by the family of MADS-box transcription factors. MADS-box genes have also been reported from gymnosperms, another major group of seed plants. AGAMOUS (AG) is the class C MADS-box floral organ identity gene controlling the stamen and carpel development in Arabidopsis. We report the characterization of an ortholog of the AG gene, named Cycas AGAMOUS (CyAG), from the primitive gymnosperm Cycas edentata. The expression pattern of CyAG in Cycas parallels that of AG in Arabidopsis. Additionally, the gene structure, including the number and location of the introns, is conserved in CyAG and other AG orthologs known. Most importantly, functional analysis shows that CyAG driven by the AG promoter can rescue the loss-of-function ag mutant of Arabidopsis. However, the ectopic expression of CyAG in ag mutant Arabidopsis cannot produce the carpeloid and stamenoid organs in the first and second whorls, although the stamen and carpel are rescued in the third and fourth whorls of the transformants. These observations show that the molecular mechanism of class C function controlling reproductive organ identity (stamen and carpel of angiosperms or microsporophyll and megasporophyll of gymnosperms) arose before the divergence of angiosperms and gymnosperms, and has been conserved during 300 million years of evolution thereafter.