Cecropins are a family of antimicrobial peptides, which constitute an important key component of the immune response in insects. Here, we demonstrate that transgenic rice (Oryza sativa L.) plants expressing the cecropin A gene from the giant silk moth Hyalophora cecropia show enhanced resistance to Magnaporthe grisea, the causal agent of the rice blast disease. Two plant codon-optimized synthetic cecropin A genes, which were designed either to retain the cecropin A peptide in the endoplasmic reticulum, the ER-CecA gene, or to secrete cecropin A to the extracellular space, the Ap-CecA gene, were prepared. Both cecropin A genes were efficiently expressed in transgenic rice. The inhibitory activity of protein extracts prepared from leaves of cecropin A-expressing plants on the in vitro growth of M. grisea indicated that the cecropin A protein produced by the transgenic rice plants was biologically active. Whereas no effect on plant phenotype was observed in ER-CecA plants, most of the rice lines expressing the Ap-CecA gene were non-fertile. Cecropin A rice plants exhibited resistance to rice blast at various levels. Transgene expression of cecropin A genes was not accompanied by an induction of pathogenesis-related (PR) gene expression supporting that the transgene product itself is directly active against the pathogen. Taken together, the results presented in this study suggest that the cecropin A gene, when designed for retention of cecropin A into the endoplasmic reticulum, could be a useful candidate for protection of rice plants against the rice blast fungus M. grisea.