When U.S. President Barack Obama inherited Washington's partnership with Pakistan, he kept the money flowing in hopes that stronger ties would help end the Afghan war and give Pakistan more tools to keep its nuclear arsenal from falling into extremists' hands.
What Washington has gotten for its billions, however, is limited progress on clearing militant strongholds on the Afghan-Pakistan border and a souring relationship that included threats this month to limit CIA drone strikes and require Pakistani clearance for Washington spy operations.
Adding to the complications is the narrow nature of the relationship. America's interests in Pakistan _ transformed by the 9-11 attacks _ are built almost entirely around high-stakes security issues and the bonds between the CIA and Pakistan's spy agency.
Washington expects its massive aid to Pakistan should buy it broad cooperation and wide latitude to strike at Islamic militants, including those backing the Taliban in Afghanistan. But in Pakistan, there are growing calls to rein in U.S. operations, particularly in the wake of a bitter diplomatic dispute after a CIA contractor fatally shot two Pakistanis in January.
Pakistan also sees the U.S. alliance in practical terms: a way to keep pace with rival India and prop up its flagging economy.
"Ultimately, both sides will suffer an unhappy relationship because we oddly need each other," said Christine Fair, assistant professor at the Center for Peace and Strategic Studies at Georgetown University in Washington, who closely follows Pakistan's military and intelligence affairs.
"They need our money and our weapons to keep up with India and to maintain their rentier state economy," she added. "We need them because we are scared about their nuclear weapons, the militants and the intersection of the two."
Both sides make no secret of their gripes.
Pakistan is frustrated by stepped up drone attacks and accusations it is weak against Islamic militants despite nearly 3,000 dead soldiers, a five-year war in its tribal areas and dozens of arrests of suspected al-Qaida operatives or affiliates.
Washington grumbles that Taliban-backed groups still find sanctuaries in Pakistan and other jihadi factions _ some with links to al-Qaida _ are growing in strength.
Obama's policies also are on the line. He abandoned the U.S. protocol of engaging almost solely with Pakistan's military. He chose instead to embrace a costly program of support for Pakistan's civilian political system, expecting it would lead to efforts to wipe out domestic extremists. They include Lashkar-e-Taiba, which carried out the 2008 Mumbai attacks and has suspected links to the Pakistan's intelligence service.
In Pakistan, newspapers express near daily outrage over an "arrogant" America allowed to kill Pakistanis with impunity and pulling the strings of the weak government of President Asif Ali Zardari. They also claim Pakistan is being made the scapegoat for U.S. and NATO military shortcomings in Afghanistan.
But it was the arrest of CIA contractor Raymond Davis that exposed the fissures in the critical relationship between CIA and Pakistan's intelligence agency, known by the acronym ISI.
Davis claimed the shootings were in self defense and was freed last month after blood money was paid to the dead mens' families.
Western officials familiar with the events said there were heated exchanges between the CIA and ISI when Pakistan refused to consider him covered by diplomatic immunity and release him immediately.
ISI Director Gen. Shuja Pasha even temporarily severed communications with the CIA, according to a Western diplomat who asked not to be identified because it would compromise his relationship with the ISI.
The fallout, however, may not be over.
The ISI has warned it could expel dozens of suspected CIA operatives, whose missions may include assessing the security of Pakistan's nuclear program. Other punishments could be halting direct U.S. contacts in the tribal areas along the Afghan border, where Americans have handed out hundreds of thousands of dollars for tips, said an ISI official, who spoke on condition of anonymity according to standing rules at the spy agency.
Both Pakistan's government and military also want fewer drone strikes, say ISI and government officials. A March 17 attack _ the day after Davis was released _ drew a rare public condemnation from Pakistan's army chief, Gen. Ashfaq Kiyani. Dozens of tribesmen died in the strike along with a handful of insurgents, said U.S. and Pakistani officials.
"Now the onus is on America to do more to build this relationship on the basis of trust and equality. Treat us as allies that you say we are," said the ISI official.
Pasha's meeting this week with CIA chief Leon Panetta was about setting new rules, said Georgetown analyst Fair.
"For the first time, (Pasha) laid down the red lines. He reckoned that in this game of chicken (America) will blink because we are freaked out by the nukes and we won't do anything that will keep us from having some eyes on," she said.
Still, Washington officials say they are reducing their dependence on Pakistan by rerouting supplies to its troops in Afghanistan through Central Asia after relentless attacks by insurgents in Pakistan. Although nearly half of all supplies still transit Pakistan.
"The two sides distrust each other as they should, but it's about managing that distrust," said a U.S. official in Washington on condition he not be identified because of the sensitivity of the subject.
While U.S. officials have expressed a deepening sense of frustration over the growth of jihadi groups that could threaten the United States and the continued sanctuaries in the tribal regions, none have publicly or privately advocated Washington cut and run.
Marc Grossman, U.S. special envoy to Afghanistan and Pakistan, told a U.S. audience this week that the Obama administration was committed to building an enduring partnership with Pakistan.
"There's always been tensions in the relationship. There's been tensions with the military, the defense, and even on development aid.I think we have to work through it and continue to support the civilian government," said U.S. Rep. Nita Lowey of New York, the top Democrat on the House Appropriations Subcommittee that oversees the U.S. State Department and foreign operations.
"It's in the interest of the national security of the United States that we continue to work with them. They are an important ally.
Yet some say Washington's support for Pakistan's transition to democracy has taken a back seat to security concerns.
Samina Ahmed, who heads the International Crisis Group in Pakistan and Afghanistan, said the Pakistani military still appears to seek to appease some militant groups and differentiate between "good and bad militants."
"If indeed it is a partnership then you (Pakistan) have to deliver on your side of the bargain," said Samina Ahmed, who heads the International Crisis Group in Pakistan and Afghanistan.
Fair said both countries are studying how to move forward in a relationship with "starkly divergent strategic interests."
"Both sides wonder if the other is a pain-in-the-ass ally or an outright foe," she said. "This conversation is happening on both sides."
Kathy Gannon is special regional correspondent for Pakistan and Afghanistan. Associated Press writers Adam Goldman, Bradley Klapper, and Donna Cassata in Washington contributed to this report.