As the uprising spread, the Libyan leader still banked on popular support, and wondered why his allies were defecting.
Muammar Gaddafi's public persona during the Libyan civil war was that of a confident, defiant leader - a man who (in a much-parodied speech) threatened to hunt his enemies from house to house, room to room, alley to alley.
But recordings of his private conversations with aides reveal a more measured, less self-assured tone. Sometimes he is frustrated with his inner circle, which slowly began to defect as the uprising dragged on. Other recordings show Gaddafi grasping for any leverage he can find - even bizarre plots, like trying to pressure the Spanish government by threatening to recognise the Basque separatist movement.
As the revolt spread, Gaddafi still clung to the hope that he had widespread popular support. By mid-March, Libyan expatriates living in London, Washington and other cities had staged anti-Gaddafi protests. But in a March 20 conversation with the prime minister, Al-Baghdadi Al-Mahmoudi, the then-Libyan leader still seemed hopeful that he could mobilize a massive show of support.
Gaddafi: Aren't you preparing a green rally?
Al-Mahmoudi: We did it locally.
Gaddafi: Not here. Do it abroad. For us it's more important overseas. We need to show a green rally with tens of thousands of Libyans.
'Where are the ideas of Nasser?'
Early conversations between Gaddafi and his aides show flashes of his public defiance. In a March 9 conversation with Tayeb El Safi, Gaddafi urges his trusted aide to crush the protesters.
Gaddafi: I want provocation. People should take to the streets. Smash those dogs, and tell them: "you traitors will bring us the British."
Gaddafi also urges Libyans to "join together" and defend the country. "Shoot at whoever approaches," he told El Safi. "Take the green flag and establish districts there."
Days later, though, his tone was more subdued. He asked El Safi about Mubarak al-Shamekh, a former senior official who defected in late February and fled to neighbouring Egypt. He nostalgically asked about the "revolutionary spirit," Arab nationalism, Palestine - themes Gaddafi had frequently exploited during his 42 years in power.
Gaddafi: Can you believe that Mubarak al-Shamekh [defected]?
El Safi: He's crazy.
Gaddafi: He's the chairman of the General People's Congress, a position beyond his dreams. What more could he want?
El Safi: I swear, it's insanity. He's out of his mind.
Gaddafi: I would understand if he were a monarchist, a rich man, from the Muslim Brotherhood, an infidel, or a fascist. But not him.
El Safi: He was on Al Hurra, the American intelligence TV. Shame on him.
Gaddafi: Where are the ideas of Nasser? Where is the revolutionary spirit? Where is his Arab nationalism, liberation of Palestine, and Arab unity?
"He had the feeling that people would never let him down," Fathi Naji, Gaddafi's former personal assistant, told Al Jazeera. "He could not imagine Libyans being against him."
Commodity smugglers and Basque insurgents
At times, it seems even Gaddafi's closest aides let him down, passing him bad advice. In a March 9 conversation with El Safi - the same one in which Gaddafi admonishes his subordinate for a lack of "revolutionary spirit" - the Libyan leader insists that "Tobruk must be on our side," referring to the eastern port city which was one of the first to rebel.
El Safi tries to placate his boss, telling him, "they are raising the green flag in Bir al-Ashab," a tiny village in the east.
"He is pulling his leg," Awad Hamza, a former Libyan army officer who spent decades under house arrest during Gaddafi's rule, told Al Jazeera. "[These] are tiny villages with about ten people. So Tayeb is fooling him, or maybe just giving an answer to get him off his back."
As the situation grew more desperate for the Libyan government, Gaddafi showed himself willing to try anything to bolster his position.
On April 8, as the European Union was preparing to impose a full embargo on Libyan oil, Gaddafi advised his prime minister to find alternative buyers for the commodity - even as the Libyan army was fighting for control of the oil cities of Brega and Ras Lanuf.
Gaddafi: Oil is like drugs. Find the commodity smugglers. Many are adventurous; they will buy from you at a discount and they don't care about embargoes.
Al-Mahmoudi: I will look into East Asia. We should send people to Malaysia, Indonesia, Singapore.
Gaddafi: This is a commodity. It can't be stopped.
Al-Mahmoudi: It can be sold, but we don't want to appear as a state. We are trying through businessmen and brokers. Ras Lanuf and Brega must be operating.
In another conversation, Gaddafi and his prime minister express frustration with Spain, which has long had close ties with Libya. Before the embargo, Spain imported roughly 13 per cent of its oil from Libyan refineries. Gaddafi owned a multimillion-dollar estate on the Costa del Sol, and his son was enrolled in business school in Spain.
The Spanish king, Juan Carlos, visited Libya as recently as 2009, in part to promote business deals between the two countries.
Gaddafi: What's wrong with the Spanish?
Al-Mahmoudi:I really don't know. Especially the prime minister, he's so distant now. I don't know why. We supported them during their economic crisis and we deposited our money there. But they turned their back on us.
Gaddafi: Tell them they do not appreciate their own interests. Tell them we will recognise the Basques. Threaten them with this, and recognise Andalusia