AbstractDiseases caused by bacteria are an important and widespread constraint, occurring in almost all crops, including vegetables, pulses, cereals, ornamentals, fruit and forages. Although several strategies have been developed to obtain disease resistance in plants using genetic engineering, few studies have effectively demonstrated the control of bacterial diseases. It has previously been reported that a gene encoding a sphingomyelinase (ThSMase), identified in Trichoderma harzianum, is up‐regulated during biocontrol against phytopathogens, and this may have biotechnological applications. SMases are involved in multiple cellular functions, including the immune response against pathogens. We hypothesized that the expression of this gene from fungi in transgenic tobacco could generate resistance to plant pathogens. ThSMase was cloned under control of the double CaMV 35S promoter plus a leader sequence from alfalfa mosaic virus (AMV), and stably introduced and expressed in tobacco. Reverse transcription‐quantitative PCR analysis revealed that the ThSMase gene was expressed at similar levels in all transgenic lines tested. Our results showed no statistically significant difference in susceptibility after challenging transgenic and nontransgenic lines with the fungus Sclerotinia sclerotiorum. However, transgenic tobacco plants revealed a significant resistance to the bacterium Pseudomonas syringae pv. tabaci, and a tolerance to Xylella fastidiosa. Our results demonstrated the strong potential of ThSMase in biotechnological processes such as molecular breeding of the plants.