BENGHAZI, Libya — Unidentified men gunned down an American chemistry teacher here on Thursday morning as he jogged outside his home, according to Libyan security officials and the director of the teacher’s school.

Friends identified the teacher as Ronnie Smith, 33, of Austin, Tex. Libyan security officials said they had yet to determine a motive for the killing, which came during a surge of assassinations and armed clashes in Benghazi.

Mr. Smith was one of the dwindling number of Western citizens still working in Benghazi, the birthplace of the uprising against Col. Muammar el-Qaddafi in 2011 and now a symbol of Libya’s growing anarchy. Over the last two years, a string of extremist attacks on diplomats and other foreigners, most notably the September 2012 killing of the American ambassador, J. Christopher Stevens, has deepened the city’s isolation.

Assassinations of security officers or former Qaddafi officials are reported almost daily, and lawless militias, including some linked to Muslim extremists, test the government’s control. Last week, at least nine people were killed as a militia linked to the killing of Mr. Stevens, Ansar al-Shariah, battled a local military unit. On Thursday, at least three security officials were killed in Benghazi.