PESHAWAR, Pakistan - Pakistani officials on Sunday hammered out a peace deal with a Taliban-linked group that could lead to the enforcement of elements of Islamic law in parts of the northwest, prompting militants in the blood-soaked Swat Valley to declare a 10-day ceasefire as a goodwill gesture.

The agreement, expected to be formally announced Monday, could reignite U.S. criticism that Pakistan's truces with insurgents merely gives them time to regroup.

Although several of its past deals failed, Pakistan says force alone cannot defeat al-Qaida and Taliban fighters sowing havoc in its northwest and attacking U.S. troops in neighbouring Afghanistan.

Swat is a former tourist haven that has fallen under heavy militant sway despite a lengthy army offensive. Regaining Swat is a major test for Pakistan's shaky civilian leadership. Unlike the semiautonomous tribal regions where al-Qaida and Taliban have long thrived, the valley is supposed to fall fully under government control.

Provincial government leaders confirmed they were talking to a pro-Taliban group about ways to impose Islamic judicial practices in the Malakand division, which includes Swat. Taliban spokesman Muslim Khan said the militants would adhere to any deal reached with the group if Islamic law was actually implemented in the region.

Khan announced the militants had freed a Chinese engineer held captive for nearly six months as a positive gesture. Long Xiaowei -- who was kidnapped in August -- was freed Saturday, days before a planned visit to China by Pakistani President Asif Ali Zardari.

Khan also announced the 10-day ceasefire.

"We reserve the right to retaliate if we are fired upon," he said. "Once Islamic law is imposed there will be no problems in Swat. The Taliban will lay down their arms."

But provincial Law Minister Arshad Abdullah said the agreement would require the pro-Taliban group to convince the militants to first give up violence. Then, existing laws governing the justice system can be amended or enforced, he said.

"Our agreement is conditioned with peace," Abdullah said. "They have to succumb to law. They have to put down their arms."

The agreement was reminiscent of past deals that required militants to stop fighting, but which eventually unravelled amid militant complaints that the government was not meeting their demands.

The pro-Taliban group -- known as the Tehrik Nifaz-e-Shariat Mohammedi, or the Movement for the Enforcement of Islamic Law -- is led by Sufi Muhammad, who Pakistan freed from custody last year after he renounced violence.

Muhammad is the father-in-law of Maulana Fazlullah, the leader of the Swat Taliban. Muhammad, who has long agitated for Islamic law in the region, said that after the formal announcement he will go to Swat and ask Fazlullah and his men to lay down their arms.

Pakistan has tried to avoid negotiating directly with militants, often using tribal elders as intermediaries. The new talks revolve around some 22 points, said Mian Iftikhar Hussain, information minister for North West Frontier Province.

Although agreeing to an Islamic judicial system is a concession to the insurgents, it is also a long-standing demand of many civilians in the conservative region who are dissatisfied with the inefficient secular justice system.

But how exactly the government is willing to define Islamic law remains to be seen. A similar deal reached last year was supposed to let religious scholars advise judges in the courts. Hussain said that agreement encountered obstacles.