ISLAMABAD, Pakistan — Pakistan is holding talks with factions of the Pakistani Taliban, a banned militant group responsible for some of the country’s worst terrorist attacks, and would forgive members who lay down their weapons, Prime Minister Imran Khan said on Friday.

Although details of the talks were unclear, negotiations with the group known as Tehrik-i-Taliban Pakistan, or T.T.P., would be the most significant development since similar efforts failed in 2014 and Pakistan turned to a massive military operation to diminish the group.

“There are different groups which form the Pakistani Taliban, or T.T.P.,” Mr. Khan said in an interview with the Turkish state television station TRT World. “We are in talks with some of them on a reconciliation process. We might not reach some sort of conclusion or settlement in the end, but we are talking.”

In a statement soon after Mr. Khan’s interview, the T.T.P. called on its fighters to continue their attacks. It denied divisions in its ranks and made no acknowledgment of the ongoing talks. It also claimed responsibility for a deadly assault on a Pakistani military convoy on Friday, the latest in a spate of such attacks.

Mr. Khan said the talks had been held in neighboring Afghanistan, where the Afghan Taliban are in power after ousting the country’s American-backed government in August.

The Afghan and Pakistani Taliban are separate entities, although their ideologies overlap, as does their training, in religious seminaries in Pakistan’s tribal areas. While Pakistan’s military has been fighting the Pakistani Taliban, it has long been accused of nurturing the Afghan Taliban.

The Afghan Taliban’s takeover next door has provided Pakistan with an ally, and Pakistani officials have urged that the group’s government in Kabul be recognized internationally.

Spokesmen for the Taliban government in Afghanistan did not respond to requests for comment on Mr. Khan’s revelation of talks in Afghanistan.

An Afghan Taliban commander aware of the talks, who spoke on condition of anonymity because he was not authorized to discuss details, said his group had proposed the negotiations to both sides and had offered its support in helping end the two-decade conflict in Pakistan.

Pakistani officials remained tight-lipped about the details, but two senior security officials who spoke on condition of anonymity to discuss sensitive talks suggested that the Afghan Taliban were acting as intermediaries.

Until last year, the Pakistani Taliban seemed considerably weakened, their top leadership killed or pushed into Afghanistan after the 2014 talks collapsed. Pakistan’s ensuing military operation, while diminishing the group, also took a heavy toll on civilians.

And the Pakistani Taliban maintained the ability to carry out ambushes, which have intensified in recent weeks.

Even if talks get underway in earnest, the positions of the two sides appear difficult to reconcile.

One of the senior Pakistani security officials said talks would only happen “within the confines of Pakistan’s law and Constitution,” and that there would be “no acceptability” for the militants if they did not accept those terms and lay down arms.

The militant group does not accept the Pakistani Constitution and has long demanded that Islamic law, or Shariah, be put in effect. It reiterated that position last month when it rebuffed an offer of amnesty from senior Pakistani officials.

“The T.T.P. has two main conditions for negotiations: Shariah’s implementation and the release of T.T.P. prisoners,” said Abdul Sayed, a security specialist and researcher on militant groups in Afghanistan and Pakistan, who is based in Sweden.

“It seems quite difficult that with such hard-line demands, its negotiations with the state can proceed. Without these conditions, T.T.P. says that meaningful dialogue cannot take place,” Mr. Sayed said.

Ihsanullah Tipu Mehsud contributed reporting from Islamabad and Mujib Mashal from New Delhi.

Tagged in: