The Lebanese government says its troops have gained full control of the Nahr al-Bared refugee camp near Tripoli, where it has been besieging Islamist militants since May.
Troops are searching nearby fields and orchards for any militants who escaped after trying to break out of the camp.
Most of the camp's 40,000 residents fled to a nearby refugee camp in the early days of the battle.
Many have had to stay in makeshift accommodation.
Altogether more than 300 people have died in the fighting, half of them soldiers.
A BBC correspondent in Lebanon says the conflict has been a real test of the army's ability to guarantee security.