Dozens of already-developed drugs designed not for killing cancer cells have previously unrecognized anti-cancer activity, according to a study published Monday in the journal Nature Cancer.

Scientists in the United States systematically screened more than 6,000 existing drugs and compounds that are either approved by the U.S. Food and Drug Administration or have been proven safe in clinical trials, including drugs for diabetes, inflammation, alcoholism, and even for treating arthritis in dogs.

They tested all the compounds against 578 human cancer cell lines and found that nearly 50 non-cancer drugs killed some cancer cells while leaving others alone.

“We thought we’d be lucky if we found even a single compound with anti-cancer properties, but we were surprised to find so many,” said Todd Golub, chief scientific officer and director of the Cancer Program at the Broad Institute of MIT and Harvard.

Some compounds acted with uncommon mechanisms: not by inhibiting a protein but by activating a protein or stabilizing a protein-protein interaction, according to the study.

Most of the non-cancer drugs that killed cancer cells in the study did so by interacting with a previously unrecognized molecular target.

“This is a great initial dataset, but certainly there will be a great benefit to expanding this approach in the future,” said the study’s first author Steven Corsello, an oncologist at Dana-Farber Cancer Institute.