Fighters led by Baitullah Mehsud, commander of the Waziri Mehsud tribe, had demanded the release of some captured comrades and the withdrawal of troops from their tribal lands in exchange for the soldiers' freedom.

Arshad said South Waziristan authorities had released some people detained under tribal laws, but that paramilitary troops were still deployed in the area.

Reuters news agency quoted intelligence officials in the area saying that 25 people had been released in exchange for the troops.

Increasing lawlessness

The soldiers' release came a day after General Pervez Musharraf, the Pakistani president, imposed a state of emergency in Pakistan, citing rising terrorism and extremism among his reasons.

Pakistan's security has deteriorated sharply since July, when commandos stormed the Red Mosque in the capital, Islamabad, to crush a "Taliban-style" movement there. The raid resulted in a peace treaty with tribal leaders in the Afghan border breaking down.

Nearly 800 people have been killed in violence since then.