Researchers used the approach to develop a drug which they tested on the notorious microbe Clostridium difficile (C.diff), the cause of widespread hospital infections.
In animal studies the drug triggered a natural process that prevented C.diff toxins destroying cells in the gut.
Scientists believe other bacteria could be attacked the same way, including those resistant to antibiotics. They are now planning clinical trials.
The newly discovered mechanism involves a nitric oxide-based molecule called S-nitrosoglutathione (GSNO) which deactivates destructive chemicals secreted by C.diff.
When the bugs attack a cell, GSNO neutralises the toxins through a process called S-nitrolysation.
Laboratory studies showed that human cells in the gut were capable of rendering the toxins harmless in this way. However, the effect is not strong enough.
The new drug is designed to amplify this natural response.
Dr Jonathan Stamler, from Case Western Reserve University in the United States, who co-led the study said: “The new research suggests GSNO, and S-nitrolysation more generally may have a universal function in protecting cells against microbial proteins.”