Pakistani agents wearing burqas seized al-Qaeda suspect Abu Faraj al-Libbi by ambushing his motorbike in a rural town, police told the BBC.
Libbi is said to have hidden in a guest room in this house
The man alleged to be a top al-Qaeda organiser was riding pillion and managed to run into a house where agents flushed him out with tear gas.
He has been held at an undisclosed location since his capture at Mardan, 60km (37 miles) from Peshawar.
Pakistani officials have ruled out his immediate extradition to the US.
They said he would not be handed over before being exhaustively questioned by local authorities.
US President George W Bush has called his capture "a critical victory in the war on terror".
BBC security correspondent Gordon Corera says it is the most significant arrest since the 2003 capture of Khalid Sheikh Mohammed, alleged mastermind of 9/11.
Our correspondent notes that the al-Qaeda hierarchy has always been fluid and complex and reports of him being the network's number three are hard to confirm.
However, there have been reports that he was involved in sending messages to al-Qaeda cells overseas with instructions to carry out attacks last year.
Amanullah Khan, deputy superintendent of police in Mardan, told the BBC the capture on Monday was purely the work of Pakistan's Inter-Services Intelligence service (ISI).
PAKISTAN'S KEY ARRESTS
Omar Saeed Sheikh, February 2002
Abu Zubaydah, Faisalabad, March 2002
Ramzi Binalshibh, Karachi, September 2002
Khalid Sheikh Mohammed, above, Rawalpindi, March 2003
Naeem Noor Khan, Lahore, July 2004
Khalfan Ghailani, July 2004, Gujrat
Amjad Hussain Farooqi (shot dead in September 2004)
Abu Faraj al-Libbi, May 2005
"This was all an ISI show," he said. "We got to the place after hearing a few gunshots."
He said he had recognised Libbi from photographs in newspapers.
Agents, some of whom had been wearing the all-encompassing robe worn by women in conservative Islamic families, stopped the motorbike and overpowered the driver, then fired some shots when Libbi ran away.
The suspect later emerged from the house where he had sought shelter unarmed and with his "hands up and head slightly bowed", the policeman said.
He was frisked and only a mobile phone was found. ISI agents bundled him into a vehicle and whisked him away before police could speak to him, he added.
Pakistan has been a key ally in what the US calls its war on terrorism and has handed over more than 700 suspected al-Qaeda operatives to the US.
It has stepped up military operations against al-Qaeda suspects in the region, near where Osama Bin Laden is widely believed to have been hiding.
Pakistani Information Minister Sheikh Rashid Ahmed said security agents had already gathered "a lot of tips" from the arrest, which meant they were "on the right track" to eventually capturing the al-Qaeda leader.
Pakistan had put a reward of 20m rupees ($340,000) on the head of Libbi in August last year.
He is wanted in connection with two attempts on the life of Pakistan's President Pervez Musharraf in December 2003, in which 17 people died.
He was regarded as the prime suspect in a number of bombings in Pakistan, including an attempt last year to kill Prime Minister Shaukat Aziz.
Libbi was also alleged to have taken over Khalid Sheikh Mohammed's role in al-Qaeda after the latter's capture.
In Washington, the US president said Libbi was a "major facilitator and chief planner for the al-Qaeda network".
On Thursday the Pakistani authorities said they had arrested a number of other al-Qaeda suspects days after the capture of Libbi.
The suspects were said to have been arrested in raids in the north-western Bajaur tribal belt, near the Afghan border on Wednesday. It is not known whether the new arrests are linked to Libbi.