CAIRO - The attackers who killed U.S. Ambassador Chris Stevens and three other Americans last September in Benghazi, Libya, represented a variety of Islamist groups and were motivated by many factors, the top Libyan official investigating the case has told McClatchy Newspapers.

They almost certainly included members of Al-Qaida in the Islamic Maghreb, the North Africa affiliate of Al-Qaida, which the French now are confronting in northern Mali, Army Gen. Carter Ham, the head of the U.S. military's Africa Command, said in a separate interview.

The two descriptions of what took place underscore the complexity of the threat posed by restive Islamist groups that suddenly found space to grow and expand after the collapse of the government of Libyan leader Moammar Gadhafi, whom Libyan rebels killed in October 2011.

"I believe there are individuals who participated in the attacks in Benghazi who had at least some affiliation with AQIM," Ham said.

"I don't interpret from that that this was AQIM-directed or even an AQIM-inspired or -supported effort. But the connection is there. And I think that what I am wrestling with is: What is the connection with all these various individuals or groups?"

Col. Abdel Salem Ashour, who heads the Libyan Interior Ministry's criminal investigations department, said he now thought the attack was hastily planned by smaller groups whose membership comprised different nationalities.

He said the attack wasn't well organized but that with the Libyan government essentially without forces in eastern Libya, it didn't need to be.

"Islamist groups have their own agendas, and they have the ability to gather and mobilize. They exploit the lack of security," he said.

Ashour said the case had been turned over to a judge in Tripoli, suggesting that suspects have been identified.

He emphasized, however, that nearly five months after the attack, no arrests have been made.

The assault has spurred several U.S. congressional investigations into why the two American compounds in Benghazi, one of which generally is referred to as the consulate and the other of which housed the CIA station in eastern Libya, were so poorly defended.

Stevens and State Department computer expert Sean Smith died when the consulate was overrun and set on fire.

Two former Navy SEALs who were working as security contractors for the CIA, Glen Doherty and Tyrone Woods, died hours later when the attackers fired mortar rounds at the CIA compound.

Outgoing Secretary of Defense Leon Panetta and Army Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff, are scheduled to testify Thursday before the Senate Armed Services committee about security measures leading up to the attack and the military response immediately afterward.