KABUL—A man believed to be a member of a U.S.-sponsored village militia in Afghanistan turned a weapon on his foreign allies Saturday, killing two coalition service members, on the same day that coalition forces finished clearing insurgents from the site of a deadly attack on a U.S.-led coalition base in southern Helmand province.

A person described as a member of the Afghan Local Police, a village militia trained by U.S. Special-Operations troops, opened fire on International Security Assistance Force service members in southern...