Updated

Pakistan agreed to free a handful of Taliban prisoners at the request of the Afghan government, in a move meant to help jumpstart a shaky peace process with the militant group in neighboring Afghanistan, officials said Wednesday.

The decision to release the prisoners -- described as mid- and low-level fighters -- is the most encouraging sign yet that Islamabad may be willing to play a constructive role in peace efforts that have made little headway since they began some four years ago, hobbled by distrust among the major players involved, including the United States.

The U.S. and its allies fighting in Afghanistan are pushing to strike a peace deal with the Taliban so they can pull out most of their troops by the end of 2014 without the country descending into further chaos. But considerable obstacles remain, and it is unclear whether the Taliban even intend to take part in the process, rather than just wait until foreign forces withdraw.

Pakistan is seen as key to the peace process. Islamabad has ties to the Taliban that date back to the 1990s, and many of the group's leaders are believed to be based on Pakistani territory, having fled there following the U.S.-led invasion of Afghanistan in 2001.

There were conflicting reports about whether Pakistan had already released the Taliban prisoners or just intended to. There was also some confusion about exactly how many prisoners were involved.

A Pakistani government official and an intelligence official said Islamabad released at least seven Taliban militants Wednesday in response to a personal request by Salahuddin Rabbani, the head of an Afghan government council for peace talks with the Taliban, who was wrapping up a three-day visit to Islamabad. The officials spoke on condition of anonymity because they were not authorized to brief the media.

An Afghan official with knowledge of the talks said no prisoners had yet been released. He said the delegation gave Pakistan a list of 40 Taliban prisoners they wanted released. Pakistan provided a list of 10 prisoners they would release, but this list was rejected by the delegation, the official said on condition of anonymity because he was not authorized to talk to the media. The two sides were still trying to reach a compromise, he said.

A joint statement put out by Pakistan and Afghanistan on Wednesday said "a number of Taliban detainees are being released" to support the peace process at the request of the Afghan government. It also called on the Taliban and other armed opposition groups to participate in peace talks and sever links with al-Qaida.

The Pakistani government official said the men involved in the release were "low- and mid-level" fighters and did not include the Taliban's former deputy leader, Mullah Abdul Ghani Baradar, who was captured in Pakistan in 2010.

The Afghan government has repeatedly asked Pakistan to release Baradar because he is seen by some as crucial to the peace process. Baradar was reportedly conducting talks with the Afghan government that were kept secret from the Pakistanis, and his arrest in the sprawling southern port city of Karachi reportedly angered Afghan President Hamid Karzai.

Pakistan helped the Taliban seize control of Afghanistan in the 1990s -- providing funding, weapons and intelligence -- and the Afghan government and the U.S. have accused Islamabad of continuing to support the group. Pakistan has denied the allegations, but many analysts believe the country continues to see the militant group as an important ally in Afghanistan to counter archenemy India.

However, Pakistan is also worried about instability in Afghanistan following the planned withdrawal of foreign forces. If civil war breaks out again as it did in the 1990s, hundreds of thousands of Afghan refugees could stream across the border into Pakistan. Violence could also give greater cover to Pakistani militants who are at war with Islamabad.

These concerns have made a peace deal more urgent in the minds of Pakistanis.

Talat Masood, a retired Pakistani army general and defense analyst, said the prisoner release would improve the relationship between Pakistan and Afghanistan, increasing the chances they could work together to strike a peace deal with the Taliban.

"It will improve the trust level and confidence," Masood said. "It will help Kabul find a genuine solution to the problem."

The prisoners could also play a positive role in the negotiations, said Masood.

"I am sure the released Taliban can play some part in making the peace process a success," he said.

Pakistan has also increased its cooperation with the U.S. in recent months. The two sides have set up working groups to identify Taliban leaders who could be open to reconciliation and ensure they are able to travel from Pakistan to the site of talks. But it's unclear whether the groups have made any progress.