From Afghanistan to America
While talking to the troops, the president had paced the stage and almost roared with passion.
But when he walked up to a podium in Bagram Air Base to stand in front of sandy coloured military vehicles, one draped with the stars and stripes, he was solemn, almost understated.
But there was no mistaking the audience.
After all, it was four in the morning in Afghanistan, but prime-time in America.
'Internal political turbulence'
There were no new announcements but the path ahead is clearer. The Nato meeting in Chicago next month will agree that Afghans will lead combat operations by next year. They will be in charge of their own security by 2014.
The goal of destroying al-Qaeda was in reach, Mr Obama said. Talks were taking place with those Taliban who wanted to renounce violence and al-Qaeda.
Intriguingly, a senior official travelling with the president said that those talks were on hold because of "internal political turbulence" within the Taliban.
At its heart, this speech was a balancing act. The vast majority of Americans want to get out of Afghanistan and end the war.
But anything that looks like cutting and running, leaving the Afghans in the lurch, would be criticised by the foreign policy establishment and by some allies, as well as his obvious opponents.
So he was explicit about what the deal he had just signed with President Karzai was and what it wasn't.
It was a 10-year commitment to support Afghanistan, to pay for training and to support the country. It wasn't about having military bases, or American troops patrolling the mountains and cities of Afghanistan.
Why not stay longer? This was his answer:
"Our goal is not to build a country in America's image, or to eradicate every vestige of the Taliban. These objectives would require many more years, many more dollars, and many more American lives. Our goal is to destroy al-Qaeda, and we are on a path to do exactly that."
And to those, in his own party who would just pull out now:
"That answer is also clear: we must give Afghanistan the opportunity to stabilise. Otherwise, our gains could be lost, and al-Qaeda could establish itself once more. And as commander-in-chief, I refuse to let that happen."
But this whole trip was also a backdrop. At the weekend the president officially launches his re-election campaign. Foreign affairs will not dominate, but one of the reasons he was elected was to end the wars, to change America's foreign policy.
It is important that he is perceived to have done that in a way that is both patriotic and responsible. There are few better ways than to be seen alongside America's military.
In the past I have never felt Obama was at ease talking to the troops, but here he really got into his stride, lavishly praising them for embodying the best of American values. He defended the 10-year war:
"We don't go looking for a fight. But when we see our homeland violated, when we see our fellow citizens killed, then we understand what we have to do."
"And because of the sacrifices now of a decade, and a new Greatest Generation, not only were we able to blunt the Taliban momentum, not only were we able to drive al-Qaeda out of Afghanistan, but slowly and systematically we have been able to decimate the ranks of al-Qaeda, and a year ago we were able to finally bring Osama bin Laden to justice."
He ended his TV speech talking about building America's future, free from fear, a nation of grit and resilience.
In Bagram, he laid the groundwork to turn his attention fully to the domestic agenda, as he campaigns to remain commander-in-chief.