The Lebanese military said Friday it had largely defeated Al Qaeda-inspired Islamic militants, overrunning their positions inside a Palestinian refugee camp, but gunfire and artillery blasts continued as troops pursued remaining fighters.

The two top leaders of the Fatah Islam militant group, Shaker al-Absi and his deputy, Abu Hureira, were still at large, along with an unknown number of fighters. They are believed to be holed up among the several thousand Palestinian civilians still inside sections of the Nahr el-Bared camp not under army control.

In a statement, the army said it had "completed its control over main (Fatah Islam) positions and was tightening the noose around the group's remaining fugitive members" holed up inside the camp near Lebanon's northern port city of Tripoli.

Nahr el-Bared's monthlong battle has been Lebanon's worst internal violence since the 1975-90 civil war, killing 76 soldiers, at least 60 militants and more than 20 civilians. It came amid a fierce political power struggle between the Western-backed government and the militant Hezbollah-led opposition.

The army statement Friday did not give details, but cited major achievements and said it will "not allow the hands of the clock to be turned back."

A few hours earlier, Defense Minister Elias Murr declared victory and said the military operation was over, adding, however, that the camp would remain "a theater of operations and under siege" until the militants surrendered.

Sporadic gunfire and bursts of army-fired artillery shells echoed around Nahr el-Bared and two columns of white smoke rose from inside the settlement on Friday. An army French-made Gazelle helicopter hovered above.

A security official said some blasts came from the army detonating mines and bombs planted by the militants. The army was also trying to clear out pockets inside the camp where militants could still be holed up, he said, speaking on condition of anonymity because he was not authorized to give official statements.

Murr told the private Lebanese Broadcasting Corporation on Thursday night that the military was doing "cleanup" in the camp. "The army is combing the area. This terrorist organization has been uprooted," he said.

His comments came after days of heavy combat in which the soldiers destroyed several compounds that housed Fatah Islam on the camp's fringes, or what is known as the "new camp."

But it appeared that larger parts of the old camp — the densely populated neighborhoods where most of the Palestinian refugees lived — were outside the army's control.

It is not clear how or when the standoff would end if the Fatah Islam fighters do not surrender — and they have vowed to fight to the death. Militants who spoke with journalists by mobile phone in the earlier days of the conflict could no longer be reached.

A Muslim cleric who has been acting as a mediator between the militants and the army, said late Thursday that the Fatah Islam fighters agreed to stop firing.

Sheik Mohammed Haj of the Palestinian Scholars Association, who met with Fatah Islam leaders during the week, said the militants would abide by conditions set by the army to end the fighting, but did not elaborate. TV stations and newspapers said the deal included handing over Fatah Islam's wounded and dismantling the group.

However, Lebanese authorities have said they will accept nothing less than a handover of all militants who fought the army.

Murr said a "large number" of Fatah Islam commanders had been killed and at least 100 wounded over the past month, while al-Absi and Abu Hureira with others had retreated deeper into the camp.

The two were among 16 Islamic fighters charged with terrorism on Thursday for two bus bombings in Lebanon's Christian heartland earlier this year, when three people were killed.