Gunbattles and mortar rounds were heard clearly at the hotel where foreign correspondents stay in Tripoli. NATO aircraft made heavy bombing runs after nightfall, with loud explosions booming across the city.
"We planned this operation with NATO, our Arab associates and our rebel fighters in Tripoli with commanders in Benghazi," Mustafa Abdel-Jalil, the head of the rebel leadership council, told the Arab satellite channel Al-Jazeera. Benghazi, hundreds of miles east of Tripoli, is the rebels' de facto capital.
Abdel-Jalil they said chose to start the attack on Tripoli on the 20th day of the Muslim holy month of Ramadan, which fell on Saturday. The date marks the ancient Islamic Battle of Badr, when Muslims conquered the holy city of Mecca in A.D. 624.
A couple hours after the rebels said they had attacked Tripoli, state television ran what appeared to be a live audio message by Gadhafi. He did not appear on television but sounded like he was calling the message in on a poor phone line which crackled at times. He announced the time and date twice to prove that he was speaking live.
Gadhafi condemned the rebels as traitors and "vermin" who are tearing Libya apart and said they were being chased from city to city - a mirror image of reality.
"Libyans wanted to enjoy a peaceful Ramadan," he said. "Instead they have been made into refugees. What are we? Palestinians?"
Government spokesman Moussa Ibrahim appeared on Libyan television to deny there was an uprising in Tripoli. But he acknowledged that there was some kind of unusual activity.
"Sure there were some armed militants who escaped into some neighborhoods and there were some scuffles, but we dealt with it within a half hour and it is now calm," he said.
The claims from both sides could not immediately be independently verified.
If the rebel did indeed attack Tripoli, it would be the first time in the 6-month-old uprising. The rebels made early gains in the revolt, capturing most of the east of the country and rising up in a few other major cities such as Zawiya and Misrata. But Gadhafi's forces fought back and until a week ago, the civil war had been mired in a stalemate.
Last weekend, rebels from the western mountains near the border with Tunisia made a dramatic advance into Zawiya, just 30 miles west of Tripoli, and captured parts of the city.
Gadhafi appeared increasingly isolated as the fighters advanced closer to Tripoli, a metropolis of 2 million people, from the west, south and east and gained control of major supply roads into the capital.
After hard-fought battles for a week in Zawiya, the rebels finally wrested the city's oil refinery, central square and hospital from Gadhafi's forces and drove them out in a major victory on Saturday that clearly swung momentum in their favor.
Hours later, the attack on Tripoli was claimed.
Col. Fadlallah Haroun, a military commander in Benghazi, said the battles marked the beginning of Operation Mermaid - a nickname for Tripoli. He also said the assault was coordinated with NATO. Haroun told the AP that weapons were assembled and sent by tugboats to Tripoli on Friday night.
"The fighters in Tripoli are rising up in two places at the moment - some are in the Tajoura neighborhood and the other is near the Matiga (international) airport," he told the Arabic satellite channel Al-Jazeera. Tajoura has been known since the beginning of the uprising in February as the Tripoli neighborhood most strongly opposed to Gadhafi's regime.
Earlier Saturday, the government organized a trip for reporters to the airport to show them it was still in government hands.
A representative for Tripoli on the rebel leadership council told the AP that rebels were surrounding almost every neighborhood in the capital, and there was especially heavy fighting in Fashloum, Tajoura and Souq al-Jomaa.
Those three neighborhoods have been bubbling with discontent ever since the beginning of the Libya uprising. They paid the highest price in deaths when protesters took the streets in anti-Gadhafi protests, only to be met with live ammunition by government militiamen.
"We don't have exact numbers yet, but we are hearing that many fighters have fallen - very likely over 100," said Mohammed al-Harizi.
U.S. Assistant Secretary of State Jeffrey Feltman visited Benghazi on Saturday.
"Gadhafi's days are numbered," he said. "The best case scenario is for Gadhafi to step down now ... that's the best protection for civilians."
In Benghazi, there were thousands celebrating in the main city square, shooting fireworks and guns into the air, and waving the rebel tricolor flag.
The taking of Zawiya, a city of 200,000, cleared the last major hurdle to a rebel march on Tripoli from the west. Rebels said Gadhafi's troops put up little resistance before fleeing their posts in Zawiya's hospital and multistory buildings around the main square - another sign suggesting that the Libyan dictator's 42-year-old regime is crumbling.
Trucks and cars packed with rebels as well as civilians drove around Zawiya's central square, honking horns, flashing V-for-victory signs and yelling "Allahu akbar" or "God is great!" An ambulance crew posed for photos on the sidewalk while a rebel called through a loudspeaker on his truck, "Zawiya is liberated!"
Still, regime troops kept firing rockets and mortars at the city from positions in the east even after rebels said they drove them out, and thunderous booms echoed across the city. The central hospital was hit by mortar rounds early Saturday, several hours after it was taken by rebels. The attack badly damaged the operating rooms, punching a hole into one of the outer walls. Metal slats from the ceiling were strewn across the floor, and soot-covered the operating tables.
Rebels also claimed that they captured the city of Zlitan, 90 miles (140 kilometers) southeast of Tripoli, after more than two months of fighting.
"Zlitan is now completely liberated after a severe fight, and for the first time I can say we have control over it," Bani told reporters Saturday.
In Zawiya, fighters were bogged down around the central square for much of the week, held back by mortar, rocket and anti-aircraft fire from Gadhafi's troops. However, on Friday afternoon, rebel reinforcements arrived and pushed toward the square and the hospital, driving out regime forces before nightfall, said 21-year-old rebel fighter Mohammed Abu Daya.
The rebels said Saturday that they were now driving Gadhafi's forces even farther east, toward the village of Jedaim on the outskirts of Zawiya.
Gadhafi's forces fired rockets and mortars at the city, killing a doctor his wife and their 9-month-old baby when a mortar hit their home, medics said.
Zawiya's main square was covered with traces of the recent fighting. Nearly every window in the surrounding hotel, banks and government office buildings was shattered, and bullet and shrapnel holes marred every wall. Shelling had collapsed two floors of one of the five buildings near the square that had been used as Gadhafi sniper positions.
The dead bodies of two government fighters lay in the square's central plaza, covered by blankets. Rebels held their breath as they passed the bodies, which some said had been there for days.
Zawiya native Faiz Ibrahim, 42, took great pleasure in walking safely through his hometown's central square. Ibrahim, trained as an engineer, had taken up arms to defend the city early in the uprising, but went underground when Gadhafi's forces retook the town. He came out of hiding as soon as rebels from the south entered the city.
"We praise God that we can come here now that we have liberated the square," he said, his Kalashnikov rifle over his shoulder. "We have to see all the destruction that it took to get them out."