“I think that we’ve been fortunate in Montana, and I hope we continue to be fortunate,” Gov. Steve Bullock said in his office in Helena, where there are no metal detectors at the Capitol doors, just a few notices about weapons being barred from the building.

“I think we always want to make sure that we can figure out ways to keep this the people’s building, and not make it too intrusive to get in to it,” he said.

There has been a trend toward tightening. Fewer than two dozen states had metal detectors at the public entrances of their capitols in 2008, according to the National Conference of State Legislatures; now the figure is more than 30. The North Carolina General Assembly is putting them in this month at its building in Raleigh. Officials there said they were meant “to make the building safe for all who have business with the General Assembly.”

Security experts say state capitols could be appealing targets, and that screening visitors is a must. But some public officials worry that metal detectors — and long lines to get through them — might deter people from visiting and demonstrating in halls of power that have always been accessible.

“I’m afraid it will make us appear less open,” said Darren G. Jackson, the Democratic leader of the North Carolina House of Representatives. “But I hope the day-to-day impact will be less.”