Antibiotics are life-saving medicines, but they can cause a lot of collateral damage in the body—side effects range from nausea to vaginal yeast infections. Plus, once they’re flushed from the body they can wreak all kinds of havoc by accumulating in the environment and building up antibiotic resistance.

However a new kind of antibiotic might avoid such side effects by turning on, with the flip of a light, only when and where they’re needed.

The basic concept is to equip drug molecules with chemical components that change shape in response to heat or light… The way a drug binds to its target usually depends on it having a shape that fits rather precisely into a “slot” on the target enzyme. So if a drug changes shape, it might no longer work.

The idea is to administer the drugs but only turn them on in the relevant parts of the body—and only as long as is needed to get the job done. Then these smart antibiotics are programmed to shut down within hours, before they are released into the environment. According to the BBC,

When swallowed, [antibiotics] tend to attack the “friendly” bacteria in the gut as well as pathogens. Drugs equipped with activation switches could be administered orally and then turned on with light once they reach the part of the body (the throat or lungs, say) where the harmful bacteria are lurking.

The prototypes in the study published recently in Nature Chemistry relied on ultraviolet light to flip the antibiotics’ “on” switch. But UV rays aren’t so good to blast at patients, so the researchers are now working on a version of the antibiotics that could work with visible or infrared light.

In the study, researchers turned antibiotics on with UV light. Bacterial growth on this agar plate only occurred where the mask prevented light from reaching the plate and turning on the antibiotics. Image credit: Willem A. Velema et. al./Nature Chemistry

In light of the CDC’s State of the Superbugs address in September, these “smart” drugs could offer a glimmer of hope by preventing the buildup of antibiotics in the environment. Although the study is just a proof of concept, it provides an antibiotic-activating light at the end of the tunnel.