Afghan president accused of hypocrisy and ingratitude over remarks made soon after Hillary Clinton's visit to the region

The US reacted with dismay on Sunday after the Afghan president, Hamid Karzai, said that he would side with Pakistan in the event of any war with America.

Karzai's remarks will be greeted with outrage by an American public already thinking him ungrateful for US military and financial support.

In an interview on Geo Television, Pakistan's largest satellite network, hours after a visit to the region by the US secretary of state, Hillary Clinton, Karzai said: "If there is war between Pakistan and America, we will stand by Pakistan." He put his hand on his heart and described Pakistan as a "brother" country.

The remark, which went further than other Karzai outbursts critical of the US, was viewed negatively not only in the US but in Afghanistan where opponents accused him of hypocrisy given Kabul's difficult relationship with Pakistan.

The US embassy in Kabul, responding to reporters' questions, said it was up to the Afghan government to explain Karzai's remarks. An embassy spokesman, Gavin Sundwall, tried to play down the row. He told the Associated Press: "This is not about war with each other. This is about a joint approach to a threat to all three of our countries: insurgents and terrorists who attack Afghans, Pakistanis and Americans."

A western diplomat, speaking anonymously, described Karzai's comments as unfortunate. "The phraseology could have been better," the diplomat said.

Karzai's words were being interpreted as an attempt to mollify Pakistan ahead of a US-Afghanistan military strategic agreement to be completed within the next few months. "[Karzai's remarks are] essentially reassurance to Pakistan that the US strategic relationship will not be used to threaten Pakistan," the diplomat said.

The statement was widely interpreted as a rhetorical flourish rather than as a significant offer of defence co-operation. Despite tension between Pakistan and the US, open warfare is a remote possibility.

Clinton on Sunday said there were no plans to put US troops into Pakistan but acknowledged differences with the country over securing an Afghan peace deal.

"We have to have a very firm commitment to an Afghan-led reconciliation peace process," Clinton told CNN, adding that Pakistan was not yet fully aboard. "We're about 90% to 95% in agreement between the US and Pakistan about the means of our moving toward what are commonly shared goals, and we have a work plan and a real commitment to making sure we are as effective as possible together."

Clinton's comments follow her warning to Pakistan that the US would act unilaterally if Islamabad failed to crack down on the Taliban-linked Haqqani network inside its North Waziristan sanctuary.

Karzai, who is scrambling to ensure his political future before the US military drawdown in 2014, needs Pakistani help to bring the Taliban to peace talks. In the event of a conflict, his army, which is dependent on US money and training, would be in no position to back Pakistan.

Nevertheless, the interview with Geo was at stark variance with the tone during the visit to the region by Clinton and David Petraeus, the CIA director. Clinton had flown to Islamabad and, in a four-hour meeting with Pakistan's top generals, called on the military to bring the Haqqanis to the negotiating table, destroy the group's leadership, or pave the way for the US to do so.

Karzai's interview with Geo was aired barely 24 hours after Clinton left. He said Afghanistan owed Pakistan a great debt for sheltering millions of refugees over the past three decades, and stressed that his foreign policy would not be dictated by any outside power. "Anybody that attacks Pakistan, Afghanistan will stand with Pakistan," he said. "Afghanistan will never betray their brother."

Karzai has wildly swung away from, and then closer to, Pakistan over the past 18 months as efforts to draw the Taliban into peace talks have gained momentum.

First he welcomed the Pakistani military chief, General Ashfaq Kayani, and the ISI spy chief, General Shuja Pasha, to talks in Kabul but then, this month, flew to New Delhi to sign a "strategic partnership" with India that strengthened trade and security ties between the two countries but infuriated Pakistan, where the movewas seen as a fresh sign of Afghan perfidy.

Karzai is trying to strike a balance, reaching a peace deal but also managing criticism from non-Pashtun groups and their political representatives, who accuse him of getting too close to Pakistan.