Bacterial pathogens colonize a host plant by growing between the cells by utilizing the nutrients present in apoplastic space. While successful pathogens manipulate the plant cell membrane to retrieve more nutrients from the cell, the counteracting plant defense mechanism against nonhost pathogens to restrict the nutrient efflux into the apoplast is not clear. To identify the genes involved in nonhost resistance against bacterial pathogens, we developed a virus-induced gene-silencing-based fast-forward genetics screen in Nicotiana benthamiana. Silencing of N. benthamiana SQUALENE SYNTHASE, a key gene in phytosterol biosynthesis, not only compromised nonhost resistance to few pathovars of Pseudomonas syringae and Xanthomonas campestris, but also enhanced the growth of the host pathogen P. syringae pv tabaci by increasing nutrient efflux into the apoplast. An Arabidopsis (Arabidopsis thaliana) sterol methyltransferase mutant (sterol methyltransferase2) involved in sterol biosynthesis also compromised plant innate immunity against bacterial pathogens. The Arabidopsis cytochrome P450 CYP710A1, which encodes C22-sterol desaturase that converts β-sitosterol to stigmasterol, was dramatically induced upon inoculation with nonhost pathogens. An Arabidopsis Atcyp710A1 null mutant compromised both nonhost and basal resistance while overexpressors of AtCYP710A1 enhanced resistance to host pathogens. Our data implicate the involvement of sterols in plant innate immunity against bacterial infections by regulating nutrient efflux into the apoplast.