“Given the national attention to safety in schools, specifically in response to tragedies like in Connecticut, this is huge,” he said. He added that, hopefully, “dominoes will start to fall, people will see it’s reasonable, it’s safer than they think, it’s proactive and it’s preventive.”

The law leaves it up to school districts to decide whether to allow armed teachers. It remains to be seen, however, if many schools will permit guns in classrooms and whether the measure will reverberate nationwide. Mr. Daugaard, a Republican, said he did not think that many schools would take advantage of the option, but that it was important for them to have the choice available.

While many gun control advocates are horrified by the notion of guns in schools, Laura Cutilletta, a senior staff lawyer with the San Francisco-based Law Center to Prevent Gun Violence, said that what South Dakota did would not spark a national trend. “For South Dakota to do this is less of a concern than if we saw it in Colorado or somewhere else like that,” she said, referring to states that have advocated for gun-control legislation.

Andrew Arulanandam, a spokesman for the National Rifle Association, said the group supported the bill and lobbied for it in the South Dakota Legislature. “There’s certainly not a one-size-fits-all approach to keeping our children safe in schools,” he said. “It’s incumbent upon state and local governments to formulate and implement a plan to keep students safe.”

The law says that school districts may choose to allow a school employee, a hired security officer or a volunteer to serve as a “sentinel” who can carry a firearm in the school. The school district must receive the permission of its local law enforcement agency before carrying out the program. The law requires the sentinels to undergo training similar to what law enforcement officers receive.