Islamabad: After being critical of Pakistan over its links with Taliban militants, Afghan President Hamid Karzai has now said his country would stand by Islamabad in the event of hostilities with any nation, including the United States or India.

"God forbid, if at any time there is a war between Pakistan and America, then we will be with Pakistan," Karzai said in an interview with Pakistan's Geo News, excerpts of which were aired by the channel this afternoon.

Asked specifically if Afghanistan would back Pakistan if it was attacked by India, Karzai replied, "Anybody that attacks Pakistan, Afghanistan will stand with Pakistan. Afghanistan will be a brother of Pakistan. Afghanistan will never betray a brother".

Karzai's comments came against the backdrop of increased tensions between Pakistan and the US on the issue of tackling terrorist groups like the Haqqani network, which use bases in Pakistan's tribal belt to carry out attacks on US and allied forces in Afghanistan.

Secretary of State Hillary Clinton on Friday said the US did not intend to act unilaterally against groups like the Haqqani network but called on Pakistan to act within "days and weeks" to "squeeze" the Taliban faction.

When Karzai was asked what he would do if there was a war between Pakistan and India, he replied, "If Pakistan is attacked by anyone, and if the people of Pakistan need Afghanistan's help, Afghanistan will be there with you".

Kazrai had been critical of Pakistan's role after the assassination of former president and peace envoy Burhanuddin Rabbani. The Afghan President even said that the Taliban will not be able to move a finger without Pakistani support.

However, Karzai turned soft on Pakistan during the interview, calling it a "brother".

"Afghanistan is a brother. (Despite) all that the Pakistani establishment has done to Afghanistan, Afghanistan is still a brother," he added.

At the same time, Karzai sought to address Pakistan's concerns about the strategic partnership agreement signed recently by Afghanistan and India, saying the two countries had been working on the pact for years.

"Now, our relation with India, our signing of the strategic partnership with India, it did not happen at the spur of the moment. This is something that we have been working on for years now," Karzai said.

"But the visit (to India) was not after these troubles that took place. It was planned long, long before," he added.

Karzai's recent visit to India during which New Delhi and Kabul signed a strategic partnership agreement had come amid tensions in Afghanistan's ties with Pakistan.

Karzai also said the tensions between the US and Pakistan had not had an impact on Kabul's attitude towards Islamabad.

"You know that we have had this engagement with Pakistan for a long time and if it comes to a brother-to-brother relationship, you'll find that Afghanistan will be there with you in times of difficulty," he said.

However, Karzai said there was "pain" in Afghanistan over Pakistan's dealing with his country.

"Please, brother, stop using all methods that hurt us and are now hurting you. Let's engage from a different platform, a platform in which the two brothers only progress towards a better future in peace and harmony. And Afghanistan will be with you," he said.

(Agencies)