A trove of documents from the Libyan intelligence service detail how increasingly paranoid and desperate the Gaddafi regime became in the last six months.
Libya's National Transition Council negotiators and tribal elders from Bani Walid meet in a mosque near the besieged town.
Among the documents include a draft letter from Col Gaddafi to President Barack Obama, propaganda stories about how the rebels were linked to al-Qaeda, and the crumbling situation on the front line, with troops in Misurata running out of ammunition, disregarding orders and turning the situation into "every man for himself".
Through the uprising, Gaddafi's security offices in Tripoli directed efforts to quash the rebellion. Among those leading the charge was intelligence chief Abdullah al-Senussi.
One of the handwritten intelligence reports, written by a man who said he had "infiltrated" the rebel council in Benghazi and seen by The Associated Press, gave the names of five members, their background and the hotels they frequented. The note concluded with an offer to kill the council members.
"I can carry out any suicide operation I'm given to assassinate members of the council or poison their food and water," it read.
Another report echoed stories spread by Libyan state media that the rebels were linked to al-Qaeda, that they lacked local support, and that they carried Viagra and condoms into battle so they could rape women.
One document discovered was a draft letter from Gaddafi to President Barack Obama.
"It is necessary to support Libya to get rid of the armed men of al-Qaeda before all of north Africa falls into the hands of bin Laden," it said. It is unclear if the letter was ever sent.
Phone taps were common and sometimes detailed rebel capabilities and movements. One paper cited 30 calls intercepted in one week. Other records contained GPS coordinates of the callers.
There were signs of paranoia. In one log, a man with a Gulf Arab accent advised that Gaddafi, his sons and associates "use their cellphone for no more than three minutes," out of fear that they were being intercepted.
Later reports suggested threats inside Tripoli from regime opponents. One envelope contained two handwritten letters, threatening to kill security forces.
One final document is an order from al-Senussi that was not carried out before he fled.
"In the crucial last moments, get rid of the contents of the administration and its secret documents by burning or destroying them."