ZAWIYAH, Libya — For the first time in months, witnesses in Tripoli reported heavy fighting across the capital late Saturday night, even as rebel forces claimed to have encircled the city by taking major towns to its east, west and south.

Rebel leaders in Tunis and eastern Libya hailed the beginning of a new uprising in the capital against Col. Muammar el-Qaddafi’s rule. And after months of rebel offenses that crumbled or stalled despite heavy support from a NATO airstrike campaign, it was the first time since the uprising began in February that the rebels threatened Colonel Qaddafi’s ultimate stronghold.

“We are coordinating the attacks inside, and our forces from outside are ready to enter Tripoli,” said Anwar Fekini, a rebel leader from the mountainous region in western Libya, speaking by telephone from Tunis. “If you can call any mobile number in Tripoli, you will hear in the background the beautiful sound of the bullets of freedom.”

Phone calls to several Tripoli residents from different neighborhoods confirmed widespread gunfire and explosions. And there were reports of frequent NATO jet overflights and airstrikes — a common accompaniment to the drumbeat of the rebel advance in the past week.