A compound in weed could help fight off superbugs — and scientists aren’t blowing smoke.

The cannabinoid compound has been found to defeat the methicillin-resistant staphylococcus aureus, known as MRSA, according to a study by researchers at McMaster University in Canada.

The chemical — cannabigerol or CBG — effectively treats mice suffering from the stubborn and deadly bacterial infection, according to the study, which was published in the journal Nature earlier this month.

“The findings suggest real therapeutic potential for cannabinoids as antibiotics,” Eric Brown, professor of biochemistry at McMaster, said in a press release. “It opens a therapeutic window, but a narrow one, to develop this into a drug.”

During the research, scientists tested 18 commercially available cannabinoids including CBG, which is non-psychoactive, meaning it won’t get patients high.

“The one we focused on was a non-psychoactive cannabinoid called CBG, as it had the most promising activity,” said Brown.“[It] proved to be marvelous at tackling pathogenic bacteria.”

They discovered that the chemical stopped bacteria from forming biofilms — microorganisms that grow on surfaces — by targeting microscopic cell membranes.

The study didn’t mention if the compound could be effective in battling the novel coronavirus, which has killed more than 2,800 people worldwide.