The attack on Tuesday in Benghazi came amid protests over a video made in the United States that Muslims saw as blaspheming the Prophet Mohammad. It resulted in the deaths of the US ambassador to Libya and three other Americans.
Magarief told CBS News that some of the suspects - including those who planned the attack - were from outside Libya and mentioned Mali and Algeria. He said some had links to al Qaeda and described other attackers as being affiliated with the group or sympathisers.
"It was definitely planned by foreigners, by people who entered the country a few months ago and they were planning criminal acts since their arrival," Magarief said.
He said the security situation in Libya remained "difficult" for Americans, as well as for Libyans.