By Kim Ghattas
BBC News, Washington
The two countries appear to have put recent tension behind them
Afghanistan's President Hamid Karzai came to Washington intent on charming everyone he met.
He said all the right things and made all the right moves.
He was all smiles, and was greeted everywhere with smiles too - he even got a standing ovation on the Senate floor.
He went all the right places too - a poignant visit to Arlington military cemetery and a tour of Walter Reed army hospital - as he repeatedly thanked America for its sacrifices.
In other words he stayed on message - there were no accusations of Western meddling in the Afghan presidential election, no threats to join the Taleban.
The White House decided that after the arm-twisting and the snubbing it was time to show some love to the Afghan leader and he was given a red carpet treatment in Washington.
Though Mr Karzai denies he ever made those comments, the impact was lasting, to the extent that his invitation to the White House at one point seemed to be in jeopardy.
So on the surface it certainly looks like the visit was a success.
But beyond the mutual praise, the public commitment to strategic ties and Mr Karzai's promises to deliver, the sceptics say little has really changed.
Show of love
The positive tone adopted by every single American and Afghan official during the visit, in private and in public, was such a contrast to the mood of a few weeks ago, it was slightly perplexing.
It was unclear what had really changed other than that both sides had decided to put the spat behind them because too much was at stake.
Mr Obama pledged to turn Afghanistan into a "prosperous" country
The military campaign in Afghanistan is one that the Obama administration has put in the context of America's national security interest and it has no choice but to work with the partner it has in Afghanistan - President Karzai.
US officials said that it had become clear that the public hectoring was counter-productive and risked derailing the relationship.
So the White House decided that after the arm-twisting and the snubbing it was time to show some love to the Afghan leader and he was given a red carpet treatment in Washington.
The pressure and calls to fight corruption were still there but were made in private.
But this is a familiar cycle that may repeat itself.
In November, around the time of President Karzai's inauguration, senior US officials said that the tension surrounding the controversial election had to be put away.
Mr Karzai was now the elected president, they said, and the West would work with him.
Public hectoring, they also said at the time, would be counter-productive and the pressure would be more private.
So it is likely that there will be more US-Afghan disagreements in the future.
And in the hope of diminishing the impact of the next spat, both Secretary of State Hillary Clinton and President Barack Obama insisted that disagreements were signs of a strong relationship.
The visit had to be a success because it came at a key time - six months into the Obama Afghanistan strategy, a few weeks before talks between the Afghan government and the Taliban in Kabul which Washington will be watching closely, and six months before the next review of American's strategy in Afghanistan.
Crucially, it comes as Nato and US troops are preparing a major operation to root out the Taleban from Kandahar, in southern Afghanistan.
US-led Nato and Afghan troops are preparing to clear Kandahar of Taliban
Clinton said the operation in Kandahar would not be a "huge, massive assault," but would take into account the bustling, vibrant nature of the city and its urban nature.
General Stanley McChrystal, the top US and Nato commander in Afghanistan, said it would be months before anyone can judge whether the military push into Kandahar had succeeded.
"It will be the end of this calendar year before you know," Gen McChrystal told reporters at a briefing at the Pentagon, which was part of a series of events planned during the four-day visit of President Karzai to the US.
On Friday he travels to Fort Campbell in Kentucky to visit US troops of the 101st Airborne Division, which has units deployed in Afghanistan.