Recognition of pathogen-associated molecular patterns (PAMPs) by pattern recognition receptors (PRRs) activates the innate immune response. The rice PRR, XA21, confers robust resistance at adult stages to most strains of the bacterial pathogen Xanthomonas oryzae pv. oryzae (Xoo). Seedlings are still easily infected by Xoo, causing severe yield losses. Here we report that Xa21 is induced by Xoo infection and that ectopic expression of Xa21 confers resistance at three leaf stage (three-week old), overcoming the developmental limitation of XA21-mediated resistance. Ectopic expression of Xa21 also up-regulates a larger set of defence-related genes as compared to Xa21 driven by the native promoter. These results indicate that altered regulation of Xa21 expression is useful for developing enhanced resistance to Xoo at multiple developmental stages.