The Afghan president refused to visit the Bagram military base when US President Barack Obama made a surprise visit there to meet troops on May 25. Similarly, the American president turned down a proposal for talks at Karzai’s palace in downtown Kabul.

Air Force One flew all night to bring Obama from Washington, DC, to the airstrip of Kabul’s international airport in Bagram.

Officially, the American president had come to the US largest military base in Afghanistan to address troops ahead of the end of Afghan campaign.

“I'm here on a single mission, and that is to thank you for your extraordinary service,” Obama said in a speech before some 32,800 American service personnel, practically all of the US contingent in Afghanistan, making their probably last tour of duty to the country.

“Our combat mission [in Afghanistan] will be over,” Obama said, promising that “America's war in Afghanistan will come to a responsible end.”

White House officials also made an arrangement to organize a tete-a-tete between Barack Obama and the outgoing Afghan President Hamid Karzai, who has been stubbornly refusing to sign a security forces agreement throughout the last year of his term in office.

The Obama administration needs this agreement to justify presence of reportedly 10,000 troops in Afghanistan after the longest military campaign in American history will be officially over.

For Obama this could become the last attempt to talk Hamid Karzai into singing the security agreement, because on May 28, Afghan voters will choose between Abdullah Abdullah, the presidential candidate from National Coalition of Afghanistan, and independent candidate Ashraf Ghani Ahmadzai in the runoff election for the next president of Afghanistan.

But Hamid Karzai rejected the invitation to meet Barack Obama at Bagram Airfield.

“President Karzai said he would warmly welcome him if he comes to the palace, but in no way would he go [to] Bagram to meet him,” Karzai's chief of staff Abdul Karim Khurram told Reuters.

An unspecified American official said on Sunday that Karzai was offered “the opportunity to come to Bagram, but we’re not surprised that it didn’t work on short notice.”

Bagram Airfield is a mere 40km from Kabul.

Instead of a face-to-face talk with Karzai, Obama had to consider himself satisfied with a 20-minute phone call to the Afghan president before his aircraft took off, the New York Times reported.

In all, Obama spent less than four hours on the ground at Bagram, delivering his speech to troops, conducting an on-site briefing with the US and ISAF military commanders in Afghanistan, and visiting wounded service members in hospital.

Hamid Karzai, who has spent all 13 years of the US occupation of Afghanistan in office and is now departing, has been consistent in turning down all kinds of proposals and threats to sign the security deal with Washington.

Without such an accord, the US may have to pull out of Afghanistan altogether by the end of 2014.