Foreign Minister Hina Rabbani Khar was responding to comments by U.S. Joint Chiefs of Staff Admiral Mike Mullen, who said Pakistan's top spy agency was closely tied to the Haqqani network, the most violent and effective faction among Islamic Taliban militants in Afghanistan.
It is the most serious allegation leveled by the United States against nuclear-armed and Muslim-majority Pakistan since they began an alliance in the "war on terror" a decade ago.
"You will lose an ally," Khar told Geo TV in New York in remarks broadcast on Friday.
"You cannot afford to alienate Pakistan, you cannot afford to alienate the Pakistani people. If you are choosing to do so and if they are choosing to do so it will be at their (the United States') own cost."
Mullen, speaking in Senate testimony, alleged Haqqani operatives launched an attack last week on the U.S. embassy in Kabul with the support of Pakistan's military intelligence.
The tensions could have repercussions across Asia, from India, Pakistan's economically booming arch-rival, to China, which has edged closer to Pakistan in recent years.
A complete break between the United States and Pakistan -- sometimes friends, often adversaries -- seems unlikely, if only because Washington depends on Pakistan for supply routes to U.S. troops fighting militants in Afghanistan, and as a base for unmanned U.S. drones.
Pakistan relies on Washington for military and economic aid and for acting as a backer on the world stage.
"The message for America is: 'They can't live with us, they can't live without us," Prime Minister Yusuf Raza Gilani told reporters.
But support in Congress for curbing assistance or making conditions on aid more stringent is rising rapidly.
The unilateral U.S. Navy SEALs raid that killed Osama bin Laden in Pakistan in May took already fragile relations between Pakistan and the United States to a low.
Relations were just starting to recover before the Kabul attack. Both sides are now engaged in an unusually blunt public war of words.
The dangers could be enormous if Washington and Pakistan, a largely dysfunctional state teeming with Islamist militants and run by a feckless, military-cowed government, fail to arrest the deterioration in relations.
At stake are the fight against terrorism, the security of Pakistan's nuclear arsenal and - as Islamabad plays off its friendship with China against the United States - regional stability.HUMILIATION
"Anything which is said about an ally, about a partner, publicly to recriminate it, to humiliate it, is not acceptable," said Khar.
The United States has long pressed Pakistan to go after the Haqqani network, which it believes operates from sanctuaries in North Waziristan on the Afghan border.
Pakistan says its army is too stretched fighting its own Taliban insurgency. But analysts say the Islamabad government regards the Haqqanis as a way to exert its influence on any future political settlement in Afghanistan.The Haqqani network, Mullen said, is a "veritable arm" of Pakistan's Inter-Services Intelligence agency (ISI).
The charges come amid mounting exasperation in Washington as the Obama administration struggles to curb militancy in Pakistan and end the long war in Afghanistan.
Mullen, CIA director David Petraeus and Secretary of State Hillary Clinton all have met with their Pakistani counterparts in recent days to demand Islamabad take action against the Haqqani network.
Any Pakistani offensive against the Haqqanis would be risky. The group has an estimated 10,000-15,000 seasoned fighters at its disposal and analysts say the Pakistani army would likely suffer heavy casualties.
Mahmud Durrani, a retired major general and former Pakistani ambassador to Washington, said both sides should ease tensions to avoid American military action beyond drone strikes or economic sanctions.