KABUL, Afghanistan — Facing growing hostility in Kabul, the new government of Pakistan sent its top diplomat to Afghanistan on Sunday, and the envoy pledged that his country would do its best to help open peace talks with the Taliban.

The diplomat, Sartaj Aziz, the foreign policy adviser to Prime Minister Nawaz Sharif of Pakistan, visited Kabul at a particularly difficult time. Since the failure last month of an American-orchestrated attempt to open peace talks with the Taliban, President Hamid Karzai and other senior officials have begun accusing the United States and Pakistan of plotting with the insurgents to divide Afghanistan.

On Sunday, Mr. Aziz tried to counter that assertion. He insisted that Pakistan, which faces its own insurgency by an offshoot of the Afghan Taliban, wanted to see “a peaceful and a stable and a united Afghanistan.”

“Without peace and security in Afghanistan, peace and security in Pakistan cannot be ensured,” he told reporters, adding that he had come to Kabul to formally invite Mr. Karzai to Pakistan. There was no word from the presidential palace whether the invitation had been accepted.

American and European officials have for years actively tried to win Pakistan’s backing for peace talks. The Taliban uses Pakistan as a rear base, and the Pakistan Army and intelligence service are believed to aid the insurgents, though Pakistan denies it gives the Taliban any material support.

Mr. Aziz on Sunday said Pakistan would do its best to bring the Taliban to the negotiating table, acknowledging that his country has “some influence and contacts” with the insurgents.

Pakistan had already helped bring Taliban representatives to Qatar, where the failed attempt to begin peace talks played out last month, he said.

“But we do not control them,” Mr. Aziz said at the news conference, which was held with the Afghan foreign minister, Zalmay Rassoul.

Despite such statements, Pakistani control of the Taliban is often taken as undisputed fact among Afghan officials, and mistrust of Pakistan runs deep among Afghans of all classes and ethnicities.

The Taliban’s reliance on Pakistan for shelter and support during the past 12 years has only deepened that historical enmity between the two countries, and many Afghans think their larger, richer and more powerful neighbor aims to dominate their country.

An error has occurred. Please try again later.

You are already subscribed to this email.

In a reflection of the tension, Mr. Rassoul, the Afghan foreign minister, was measured in his comments on Sunday. He said his government had tried to improve relations with Pakistan, but until now had gotten only tepid responses to its overtures.

“Unfortunately, so far these efforts of the Afghan government haven’t borne positive results,” Mr. Rassoul said.

For Pakistan, sending Mr. Aziz to reset relations with Afghanistan was in itself a risky move. Earlier this year, he was accused by Afghanistan’s Foreign Ministry of privately suggesting to Afghan officials that their nation effectively cede some provinces to the Taliban as part of a power-sharing arrangement to help end the war.

The idea appears to have fed the suspicion among Mr. Karzai and some members of his inner circle that Pakistan is in league with the United States and the Taliban.

Abdul Kharim Khurram, the chief of staff to Mr. Karzai, detailed the suspicions in an interview last week with an Afghan television station, 1TV, accusing all three of killing innocents in Afghanistan and seeking to divide the country.

Pakistan, he told 1TV, could end the war “in weeks” if it wanted to.

Mr. Aziz did not directly address those comments on Sunday. Alluding to the period after the NATO combat mission ends here, he said, “It is for Afghans themselves to decide what system and what kind of post-2014 arrangement they would like to have.”

After the Qatar talks failed, Mr. Karzai suspended talks between the United States and Afghanistan on a deal to keep American troops here beyond 2014.

Among the items Afghanistan wants in the deal is a security pact that would compel the United States to defend Afghanistan from Pakistan.

American officials have scoffed at the idea, which they say is a nonstarter for the Obama administration.

A version of this article appears in print on July 22, 2013, on Page A9 of the New York edition with the headline: Pakistan Sends Envoy to Afghanistan, Pledging a Push for Regional Peace. Order Reprints|Today's Paper|Subscribe