CAIRO — Libyan authorities have singled out Ahmed Abu Khattala, a leader of the Benghazi-based Islamist group Ansar al-Shariah, as a commander in the attack that killed the American ambassador to Libya, J. Christopher Stevens, last month, Libyans involved in the investigation said Wednesday.

Witnesses at the scene of the attack on the American Mission in Benghazi have said they saw Mr. Abu Khattala leading the assault, and his personal involvement is the latest link between the attack and his brigade, Ansar al-Shariah, a puritanical militant group that wants to advance Islamic law in Libya.

The identity and motivation of the assailants have become an intense point of contention in the American presidential campaign. Republicans have sought to tie the attack to Al Qaeda to counter President Obama’s assertion that by killing Osama bin Laden and other leaders his administration had crippled the group; Mr. Abu Khattala and Ansar al-Shariah share Al Qaeda’s puritanism and militancy, but operate independently and focus only on Libya rather than on a global jihad against the West.

But Mr. Abu Khattala’s exact role, or how much of the leadership he shared with others, is not yet clear. His leadership would not rule out participation or encouragement by militants connected to Al Qaeda in the Islamic Maghreb, an Algerian Islamic insurgency that adopted the name of Bin Laden’s group a few years ago to bolster its image, but has so far avoided attacks on Western interests.