TRIPOLI, Libya – Libyan rebels said they launched their first attack on Tripoli in coordination with NATO late Saturday, and Associated Press reporters heard unusually heavy gunfire and explosions in the capital. The fighting erupted just hours after opposition fighters captured the key city of Zawiya nearby.

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.

Several hours after the rebels said they’d attacked Tripoli, state TV ran what appeared to be a live audio message by Gadhafi.

Gadhafi condemned the rebels as “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.”

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 rebels did indeed attack Tripoli, it would be the first time in the six-month-old uprising. The rebels made early gains in the revolt, capturing most of the east of the country. 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 city of 2 million, 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 Saturday.

Hours later, the attack on Tripoli was claimed.