The study by a team at the nonpartisan Violence Prevention Research Program at the University of California at Davis identified more than 20 cases in which California’s red-flag law was used in an effort to prevent a mass shooting.

None of the threatened shootings in those cases took place, according to the study, which will be published this week in the Annals of Internal Medicine.

Researchers could not definitively state that California’s red-flag law was responsible, noting that it was impossible to know whether threats would have been carried out.

But the cases “suggest that this urgent, individualized intervention can play a role in efforts to prevent mass shootings, in health care settings and elsewhere,” the researchers said.