Pakistan has agreed to hand over to Afghanistan captured Afghan Taliban number two, Mullah Abdul Ghani Baradar, and other militants, the president's office said on Thursday.

Pakistan had no immediate comment on the Afghan government's statement on Thursday, but late on Wednesday said Mullah Baradar was being investigated for crimes in Pakistan and would be tried there in the first instance.

Three senior Taliban officials were captured in Pakistan this month, including Mullah Baradar. His capture has been viewed as an intelligence coup and a sign of greater Pakistani cooperation in fighting Afghan militants.

The government of Pakistan has accepted Afghanistan's proposal for extraditing Mullah Baradar and other Taliban who are in its custody and showed readiness to hand over those prisoners ... on the basis of an agreement between the two countries, a statement from President Hamid Karzai's office said.

The prisoners are accused of criminal acts, it said.

Pakistan's Interior Ministry in a statement late on Wednesday had said Mullah Baradar was being investigated for crimes he may have committed in Pakistan, including illegal entry into the country.

The request of Afghan authorities will be examined according to the law and if Mullah Baradar has committed any crime inside Pakistan, he will be first tried in Pakistan, the ministry said.

Some analysts say Mullah Baradar could help reconciliation between the Taliban and Karzai's U.S.-backed government, if he so desires, despite his background as a fierce military commander and advocate of suicide bombings.

The Afghan announcement comes as Karzai reaches out to Taliban foot soldiers with offers of jobs, money and land in the hope they will lay down their weapons and accept his government's authority.

The Taliban, who have made a steady comeback since being ousted by U.S.-backed Afghan forces in late 2001, are under pressure in Afghanistan and increasingly so in Pakistan, where they enjoy sanctuary under .

NATO is pushing ahead with one of its largest assaults in Afghanistan since the start of the war, aimed at driving the Taliban from their last big stronghold in the country's most violent province to make way for Afghan authorities to take over.

Also on Thursday, Afghan authorities raised the Afghan flag over Marjah, the town at the center of the offensive, to signify the handover of control to the government from NATO troops led by the U.S. Marines.

Nonetheless, a NATO spokesman said completely removing the Taliban from the area could take days or even weeks.

As more Afghan troops, as more intelligence, as more surveillance, as more alternatives and services come is more and more difficult for the insurgents to come back, NATO spokesman Eric Tremblay told reporters.

(Additional reporting by Robert Birsel in Islamabad, Writing by Bryson Hull; Editing by Michael Georgy)