Xanthomonas citri subsp. citri (Xcc) is a bacterial pathogen that causes citrus canker in susceptible Citrus spp. The Xcc genome contains genes encoding enzymes from three separate pathways of trehalose biosynthesis. Expression of genes encoding trehalose-6-phosphate synthase (otsA) and trehalose phosphatase (otsB) was highly induced during canker development, suggesting that the two-step pathway of trehalose biosynthesis via trehalose-6-phosphate has a function in pathogenesis. This pathway was eliminated from the bacterium by deletion of the otsA gene. The resulting XccΔotsA mutant produced less trehalose than the wild-type strain, was less resistant to salt and oxidative stresses, and was less able to colonize plant tissues. Gene expression and proteomic analyses of infected leaves showed that infection with XccΔotsA triggered only weak defence responses in the plant compared with infection with Xcc, and had less impact on the host plant's metabolism than the wild-type strain. These results suggested that trehalose of bacterial origin, synthesized via the otsA-otsB pathway, in Xcc, plays a role in modifying the host plant's metabolism to its own advantage but is also perceived by the plant as a sign of pathogen attack. Thus, trehalose biosynthesis has both positive and negative consequences for Xcc. On the one hand, it enables this bacterial pathogen to survive in the inhospitable environment of the leaf surface before infection and exploit the host plant's resources after infection, but on the other hand, it is a tell-tale sign of the pathogen's presence that triggers the plant to defend itself against infection. © The Author 2015. Published by Oxford University Press on behalf of the Society for Experimental Biology.