Pakistan has signed a deal with pro-Taleban militants on the Afghan border aimed at ending years of unrest.
The agreement aims to end cross-border attacks
The North Waziristan accord calls on tribesmen to expel foreign militants and end cross-border attacks in return for a reduced military presence.
Tens of thousands of Pakistani troops are fighting foreign Islamic militants and their local supporters in the country's restive tribal belt.
Hundreds of people have been killed in violence in North Waziristan this year.
The BBC's Barbara Plett in Islamabad says some observers believe the deal offers the government an exit from a military strategy that has largely failed.
Dozens of soldiers have been killed in North Waziristan over the past year and local support for the Taleban seems to have increased rather than decreased, she says.
Meanwhile, a major offensive by Nato-led forces in the Panjwayi district in the southern Afghan province of Kandahar is pushing Taleban fighters into a corner, Nato officials say.
Tuesday saw more artillery barrages and air strikes, although the fighting is less intensive than over the weekend when Nato says 200 militants were killed - a figure disputed by the Taleban, who say many of the casualties were civilians.
Nato Secretary General Jaap de Hoop Scheffer is in Afghanistan to assess progress in the alliance's mission to stabilise the south, and will meet Afghan President Hamid Karzai on Wednesday.
The agreement brokered by a grand council (jirga) of tribal elders in North Waziristan comes five years after Pakistani troops went after Taleban and al-Qaeda elements on the Afghan border.
Senior army officers and militants hugged and congratulated each other after signing the agreement at a college football ground in Miranshah, the main town in the North Waziristan region.
Details of the deal signed by the two sides were given in a brief speech by local MP Haji Nek Zaman, a member of the council of elders which was authorised to negotiate on behalf of the Pakistani government.
Under the accord, the Pakistani military promises to end major operations in the area.
It will pull most of its soldiers back to military camps, but will still operate border check-points.
Tribal elders held weeks of consultations
Over the summer the military met other conditions, releasing a number of tribesmen in an apparent goodwill gesture to the militants and withdrawing soldiers from new check-posts.
Local Taleban supporters, in turn, have pledged not to harbour foreign militants, launch cross-border raids or attack Pakistani government troops or facilities.
Observers say meeting these conditions could be difficult, as the Taleban has support on both sides of the Pakistan-Afghan border.
They also point to similar deals in neighbouring South Waziristan which did stop attacks on Pakistani soldiers but strengthened the hand of local Taleban supporters.
The agreement comes shortly ahead of a visit by President Pervez Musharraf of Pakistan to Afghanistan.
Relations between Kabul and Islamabad have been strained in recent months because of differences in tackling what both refer to as cross-border terrorism.
Afghan Foreign Minister Rangeen Dadfar Spanta said the peace deal in North Waziristan was not enough on its own.
"I believe this is a cardinal mistake to believe that Waziristan is the only centre of terrorist activity," he told the BBC.
"I think it is [in] a lot of other places in our region and a lot of organisations and also madrassas [religious schools], that they are the centre of terrorist activity."