Pakistan is lobbying Afghanistan's president against building a long-term strategic partnership with the U.S., urging him instead to look to Pakistan-and its Chinese ally-for help in striking a peace deal with the Taliban and rebuilding the economy, Afghan officials say.

The pitch was made at an April 16 meeting in Kabul by Pakistani Prime Minister Yousuf Raza Gilani, who bluntly told Afghan President Hamid Karzai that the Americans had failed them both, according to Afghans familiar with the meeting. Mr. Karzai should forget about allowing a long-term U.S. military presence in his country, Mr. Gilani said, according to the Afghans. Pakistan's bid to cut the U.S. out of Afghanistan's future is the clearest sign to date that, as the nearly 10-year war's endgame begins, tensions between Washington and Islamabad threaten to scuttle America's prospects of ending the conflict on its own terms.

With the bulk of U.S.-led coalition troops slated to withdraw from Afghanistan by the end of 2014, the country's neighbors, including Pakistan, Iran, India and Russia, are beginning to jockey for influence, positioning themselves for Afghanistan's post-American era.

Pakistan enjoys particular leverage in Afghanistan because of its historic role in fostering the Taliban movement and its continuing support for the Afghan Taliban insurgency. Washington's relations with Pakistan, ostensibly an ally, have reached their lowest point in years following a series of missteps on both sides.

Pakistani officials say they no longer have an incentive to follow the American lead in their own backyard. "Pakistan is sole guarantor of its own interest," said a senior Pakistani official. "We're not looking for anyone else to protect us, especially the U.S. If they're leaving, they're leaving and they should go."

Mr. Karzai is wavering on Pakistan's overtures, according to Afghans familiar with his thinking, with pro- and anti-American factions at the presidential palace trying to sway him to their sides.

Click here for more on this story from The Wall Street Journal.