Dozens of gun-toting Islamic militants briefly seized a government building in the northwestern Pakistani city of Peshawar late Saturday, but no one was hurt, officials said.
The militants were believed to be loyal to Mangal Bagh, the leader of a radical group accused by officials of kidnapping for ransom in Peshawar, harassing locals and running torture centres and private jails.
Witnesses said the fighters -- who later fled under cover of darkness when security forces surrounded the building -- were heavily-armed and wearing masks.
A security official said the building's security guards were briefly taken hostage, but they managed to alert police, prompting the response from security forces.
"We have vacated the building and freed the hostages but the militants have managed to escape," Peshawar police chief Sulaiman Shah told reporters.
"A search and cordon operation will continue for three hours to apprehend the militants," he said, adding that it was not possible to say how many had been involved in the siege.
Peshawar, the capital of North West Frontier Province, is not far from Pakistan's rugged tribal areas on the Afghan border, where the army is battling Taliban and Al-Qaeda militants.
A senior security official told AFP the hostage-takers had been able to leave the building after tribal elders from the Khyber agency intervened, indicating that an agreement had been made to secure their safe passage.
"The attack appears to have been symbolic, to convey a message that they can attack a government building," the security official said.
As well as kidnapping for ransom, Bagh's Lashkar-e-Islam group has also been accused of attacking convoys ferrying supplies to NATO and US troops in Afghanistan that travel through the historic Khyber Pass.
Bagh and authorities signed a peace pact in July after the military had conducted a 10-day operation to counter his fighters, who had threatened to take over Peshawar.
Under the accord, Bagh and his group agreed not to enter or patrol in Peshawar, officials said at the time.
When the agreement was signed, Islamabad was under mounting pressure from Washington to live up to its partnership in the US-led "war on terror" and crack down on extremist fighters with bases in the tribal areas.
Pakistan's new government signed a peace deal with Taliban militants near the Afghan border after winning February elections, but went ahead with the operation against the Bagh-led radicals.