Weeks of Western air strikes have failed to dislodge the Libyan leader, but have instead imposed a stalemate on a war Gaddafi looked to have been winning with government forces held at bay in the east and around the besieged city of Misrata, while fighting for control of the western mountains.
But with neither side apparently able to gain the upper hand, Gaddafi struck a conciliatory tone in an 80-minute televised address to the nation in the early hours of Saturday.
"(Libya) is ready until now to enter a ceasefire," said Gaddafi, speaking from behind a desk and aided by reams of paper covered in what appeared to be hand-written notes.
"We were the first to welcome a ceasefire and we were the first to accept a ceasefire ... but the Crusader NATO attack has not stopped," he said. "The gate to peace is open."
Gaddafi denied mass attacks on civilians and challenged NATO to find him 1,000 people who had been killed in the conflict.
"We did not attack them or cross the sea ... why are they attacking us?" asked Gaddafi, referring to European countries involved in the air strikes. "Let us negotiate with you, the countries that attack us. Let us negotiate."
But as he spoke, NATO warplanes hit three targets close to the television building in Tripoli in what state media said was an attempt to kill Gaddafi who has ruled Libya for 41 years.
The air strikes left a large crater outside the attorney general's office but did not damage the building and hit two other government offices housed in colonial-era buildings. It was not immediately clear if there were any casualties.
Previous ceasefire offers have been rebuffed by NATO as Libyan government forces continued to fight on, something which looked as though it would be repeated as Gaddafi indicated he wanted both sides to stop fighting at once, saying "a ceasefire cannot be from one side".
More importantly though, the Libyan leader refused to leave the country or step down, the central demand of the rebels, the United States, and also of France and Britain which are leading the NATO air campaign.
"I'm not leaving my country," Gaddafi said. "No one can force me to leave my country and no one can tell me not to fight for my country."
Gaddafi's forces showed no sign of giving up the fight either, claiming to have captured the port of the city of Misrata on Friday, the last major rebel outpost in western Libya, but NATO said it saw no evidence of that.
Libya's government has threatened to attack any ships approaching Misrata, potentially depriving insurgents of a lifeline to the country's eastern insurgent heartland.
NATO said Gaddafi forces had laid mines on the approach to the harbour, under siege for weeks, and forced a temporary halt in humanitarian shipments.
"NATO forces are now actively engaged in countering the mine threat to ensure the flow of aid continues," the alliance said.
Further west, the war spilled into Tunisia when Gaddafi's forces overran a rebel enclave at the frontier. The Libyan army shelled the Tunisian border town of Dehiba, damaging buildings and wounding at least one person, witnesses said. They said Libyan soldiers drove into the town in a truck chasing rebels.
Tunisian Deputy Foreign Minister Radhouane Nouicer, speaking on Al Jazeera television, said casualties, including a young girl, were inflicted when the conflict spilled over on Friday.
"We summoned the Libyan envoy and gave him a strong protest because we won't tolerate any repetition of such violations. Tunisian soil is a red line," he said.
The Libyan government said rebels had briefly pushed its forces into Tunisia and that it was coordinating with Tunisia to avoid a disaster in the border area.
"We are respecting the sovereignty of the Tunisian country and state," spokesman Mussa Ibrahim said.
A Reuters cameraman who crossed into Libya from Dehiba saw the bodies of three Gaddafi soldiers on the ground. It was not clear if they had been shot by rebels or by Tunisian forces.
Tunisian border guards had shut down the border, he said. They were laying barbed wire and fortifying their positions.
Libyan refugees fleeing the fighting in the Western Mountains were reaching the crossing but unable to get through.
Reuters photographers in Dehiba, a short distance from the border, saw several abandoned pick-up trucks which Gaddafi loyalists had driven. One had a multiple rocket launcher on the back. Another, which had overturned and lay upside down in the sand, was fitted with a heavy calibre machine gun.
Rebels seized the Dehiba post a week ago. It controls the only road link which their comrades in the Western Mountains have with the outside world, making them rely otherwise on rough tracks for supplies of food, fuel and medicine.
"Right here at this point I'm looking at the new flag flying up there at the border. The rebels have got control of it, the freedom fighters. We're just in the process of opening it up," rebel Akram el Muradi said by telephone.
After nightfall, Gaddafi's forces resumed their bombardment of the post in an apparent attempt to return and the government said it had regained control over the Libyan side of the border.