Updated

Pakistan granted amnesty on Saturday to five tribal elders accused of harboring Al Qaeda fugitives, and gave foreigners in a lawless region near the Afghan border until April 30 to surrender or face military action, officials said.

In return, the five Zali Khel (search) tribesmen, who have hundreds of armed followers, promised to live peacefully, be loyal to Pakistan and not take part in any terrorist activity.

Authorities also agreed to release on Sunday 50 tribesmen arrested in a bloody Pakistani army operation in South Waziristan (search) last month, its largest since it threw its support behind the U.S.-led war on terrorism in late 2001.

The amnesty was formalized at a ceremony Saturday attended by thousands of tribesmen and senior Pakistani government and military officials in the village of Shakai (search), 15 miles north of Wana, the main town in the region.

The deal could disappoint Pakistan's American allies fighting Taliban (search) holdouts and Al Qaeda militants in Afghanistan. They had praised Pakistan's recent crackdown in the tribal areas and made clear they expected to see more.

Hundreds of militants, including an Uzbek separatist leader allied to Al Qaeda, were believed to have escaped the March 16-28 operation, which involved thousands of troops and left more than 120 people dead, including at least 48 soldiers.

Regional military commander Lt. Gen. Safdar Hussain told the gathering that foreigners with wives and children in Pakistan would be treated with "respect and honor" and allowed to stay if they surrendered and expressed loyalty to the country.

"But if they don't accept this offer by April 30 then we will use force against them, which is the last option," Hussain said.

Many of the foreign inhabitants of the region, including Arabs and Central Asians, are veterans of the war against the Soviet occupation of Afghanistan in the 1980s who later settled in Pakistan.

Earlier, Brig. Mahmood Shah, security chief for Pakistan's tribal regions, said Pakistani forces would remain in South Waziristan — long believed to be a possible hideout for Osama bin Laden and al Qaeda No. 2, Ayman al-Zawahri — to ensure that Pakistani soil was not used for terrorism.

But he said no more operations would be needed if tribesmen stuck to the conditions of their amnesty.

American, Afghan and Pakistani officials say the area has been used by Taliban militants to launch frequent attacks on U.S. soldiers in Paktia, Khost and Paktika provinces. An American soldier, former NFL player Pat Tillman, was killed in an ambush in Khost on Thursday.

The five tribesmen — Naik Mohammed, Noor Islam, Maulvi Abbas Khan, Sharif Khan and Maulvi Abdul Aziz — have been sought by authorities for months. All but Aziz, who sent a representative, attended the ceremony.

The ceremony was delayed for several hours after a section of roof at the religious school where it was conducted collapsed on Saturday morning, injuring about 20 people who were trapped under fallen masonry.

The U.S. military spokesman in Afghanistan reacted cautiously to news of the amnesty.

"If this is a political process and a means to an end, clearly that's a good thing, but at the end of the day I think we expect Pakistani action there," Lt. Col. Matthew Beevers said in Kabul on Saturday.

Some 163 foreign and local suspects were arrested in the March operation. Safdar said all innocent prisoners would be released, starting with 50 to be freed on Sunday.