Muammar Gaddafi, desperate to turn the West against the rebels leading a civil war against his government, frequently tried to portray the opposition as a collection of radical Islamists.
One of his earliest speeches, in February 2011, warned that Al Qaeda leader Osama bin Laden was trying to establish "an Islamic emirate" in Libya.
The recordings obtained by Al Jazeera reveal that these warnings weren't merely a propaganda stunt; top Libyan officials were concerned, from the earliest days of the uprising, about the perceived role played by Islamists. One of Gaddafi's closest aides, Tayeb El Safi, spoke with an informant in eastern Libya on February 15, and the man warned him about "Islamists with beards leading the protests."
Caller: They have long beards, they are organized, their slogans are aggressive. Their slogans are not about reform or development or anything like that. They are saying bad things.
El Safi: Really, what are they saying?
Caller: There is no God but God, and Gaddafi is the enemy of God. These are Islamists, with beards, leading the protests. There are two kinds of protesters, the Muslim Brotherhood and the youth. They were prepared with banners and Islamist slogans.
This would be a recurring theme in the days and weeks to come. On February 17, El Safi told a caller that "extremists" were helping to organise the opposition in Benghazi.
El Safi: They are doing everything, they are bringing weapons and Molotov cocktails. They are trained. The extremists are leading them [the youth]. They are protecting them from right and left. They are giving them money, water and juice. It is a supported act.
And the following day, a caller warned El Safi that the city of Baida had fallen into rebel hands. "They declared what they call the Islamic Arab Republic," the informant said. "Those who are using heavy weaponry are from Afghanistan and abroad."
'We are behind these protests'
Hundreds of Libyans traveled to Afghanistan in the 1980s to fight the Soviet Union. Some of them returned home to found the Libyan Islamic Fighting Group (LIFG), which tried to overthrow Gaddafi and establish an Islamic state. The group was banned, and many of its members were jailed; hundreds of them were released in February 2011 in a bid to placate the anti-government protesters.
Gaddafi's aides insisted on several occasions - like this conversation from March 1 - that these fighters played a leading role in the uprising:
El Safi: I tell you.
El Safi: Yesterday they were distributing pamphlets in Benghazi. They are saying: "We were fighting in Afghanistan, and in Bosnia, and elsewhere. We are behind these protests."
This wasn't just propaganda on the part of the government: Ismail Salabi, a rebel commander in eastern Libya (and a self-described Islamist), acknowledged that some of the returnees from Afghanistan played a role in the uprising. "For sure, there were people who had been in Afghanistan," he told Al Jazeera. "They were jailed but afterwards had a normal life."
As the situation in Libya worsened and NATO began its bombing campaign, Gaddafi and his aides tried to connect the civil war to Al Qaeda.
Saif al-Islam: How is the east?
El Safi: It is okay. We got information that Al Qaeda and Hezbollah elements might have entered the country.
The language about Al Qaeda and Hezbollah might have been overblown, but members of the opposition acknowledge that - at least for a time - there were indeed "foreign fighters" in Libya.
"I have never said this before, but people from other Arab countries came at the beginning to fight the jihad in Libya," he said. "But when they realized it was a people's revolution, and that we only wanted weapons, they went back to their countries and left the matter to Libyans only."