"Allahu Akbar (God is Great) for our victory," residents of Zawiya chanted as they paraded through the city's main square. Some carried on their shoulders an air force colonel they said had just defected to the rebels' side.
Witnesses said pro-Gadhafi forces battled rebels for six hours overnight but could not retake control of the city. They said the last of several assaults by the Gadhafi loyalists came at around 3 a.m. local time.
Despite protesters closing in on Tripoli, Moammar Gadhafi insisted to ABC's Christiane Amanpour that there are no protesters in his country at all.
"They love me, all my people with me, they love me all," he said. "They will die to protect me, my people."
Amanpour is the only American reporter to sit down with Gadhafi.
Susan Rice, the U.S. ambassador to the United Nations, said Gadhafi is disconnected from reality.
"It sounds just frankly delusional," Rice said.
Since the revolt against Gadhafi's 41-year-old rule began two weeks ago, his regime has launched the harshest crackdown in the Arab world where authoritarian rulers are facing an unprecedented wave of uprisings. Gadhafi has already lost control of the eastern half of the country and at least two cities close to the capital - Zawiya and Misrata. He still holds the capital Tripoli and other nearby cities.
Gadhafi insisted to Amanpour that he has not ordered to have his own people killed, though the U.N. estimates hundreds, if not thousands, have died.
Secretary of State Hillary Rodham Clinton warned that Libya is at risk of collapsing into a "protracted civil war," and told Congress that the U.S. must lead an international response to the crisis.
Gadhafi said he has been betrayed by the U.S. because according to him, President Barack Obama is misinformed.
The Associated Press contributed to this story.