SAN FRANCISCO — The San Francisco Police Commission has voted to arm police officers with electric stun guns in the wake of a deadly shooting.

Friday’s 4-3 vote was met with shouts of “Shame!’ from activists who contend that the supposedly less-lethal weapons can kill and could escalate rather than de-escalate confrontations, leading to deadly encounters.

After one speaker refused to stop talking, the commission recessed for about an hour and returned in another room before taking the vote.

The commission voted to equip police with Tasers beginning in December 2018. It did not indicate whether some or all officers would receive the weapons. Equipping all of them could cost about $8 million, according to a city estimate.

Among the largest U.S. cities, only San Francisco and Boston do not equip officers with stun guns.

The city has considered providing stun guns to its police for more than a dozen years. But it always rejected the concept, in part because of community opposition.

However, the idea gained new traction in 2015 after police shot and killed a knife-wielding man after failing to stop him with pepper spray and beanbag rounds.

In a report last year, the U.S. Department of Justice said that San Francisco should consider the use of stun guns.

“They could not believe we did not have these,” Commissioner Thomas Mazzucco said at Friday’s meeting. “They believe it will save lives.”

Opponents, including several commissioners, argued that the police department should concentrate on enforcing a new policy that calls for officers to de-escalate confrontations and use force as a last resort.

Giving stun guns to officers “will derail the progress we have made,” Commission President L. Julius Turman said.

“De-escalation has been a topic that the San Francisco Police Department has taken very seriously,” Police Chief Bill Scott said. “The reality is there are times when de-escalation does not work and officers have to use force as safely as possible.”