Riding low in the opinion polls and leading a country battered by Covid-19, rising prices and bitter partisan politics, Joe Biden needed to use his State of the Union address to reset and relaunch his presidency.
He got a lot of unexpected help from Vladimir Putin: his invasion of Ukraine gave Mr Biden the opportunity to embellish his foreign policy credentials - and he seized the opportunity.
"Six days ago, Russia's Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated.
"He thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined.
"He met the Ukrainian people", he told a joint session of Congress.
Mr Biden was even able to get the usually bitterly divided Congress to unite in a show of solidarity - inviting the members of both houses to stand in solidarity with the Ukranian people.
But the President must walk a tightrope of domestic politics to put his foreign policy into action. Whilst there is plenty of emotional support for Ukraine amongst the population, there is little or no appetite for sending US soldiers and airmen into harms way in somebody else's war.
Still, he faces criticism (from the people who criticise him for everything else he does) for not being tougher with Putin.
That’s why he stressed US troops will not be sent to Ukraine, but are being sent to Europe to bolster NATO’s eastern defences, in case Putin decides to keep going: "For that purpose we’ve mobilised American ground forces, air squadrons, and ship deployments to protect NATO countries including Poland, Romania, Latvia, Lithuania, and Estonia.

"As I have made crystal clear the United States and our Allies will defend every inch of territory of NATO countries with the full force of our collective power."
That was the big threat of the night: push into the Baltic states or Poland, and it is war with the United States.
And presumably with its allies.
He spent some time laying out the quiet diplomacy he has engaged in over the past few months, building unity among European states and others for the sanctions actions that have been rolling out over the past few days in a coordinated fashion.
The announcement the US was closing its airspace to Russian flights followed the EU states, but left the President with something fresh to announce at the State of the Union.
Also fresh was his threat to go after the wealth of Russian oligarchs - the group of people who became super-rich after the fall of the Soviet Union by taking over vast tracts of Russian industry, and who have been accused of bankrolling Vladimir Putin (as well as living the high life in Western capitals).
"Tonight I say to the Russian oligarchs and corrupt leaders who have bilked billions of dollars off this violent regime no more.
"The US Department of Justice is assembling a dedicated task force to go after the crimes of Russian oligarchs.
"We are joining with our European allies to find and seize your yachts, your luxury apartments, your private jets.
"We are coming for your ill-begotten gains".
'We're coming for your ill-begotten gains,' US President Joe Biden warned Russian oligarchs as he pledged 'support to the Ukrainians in their fight for freedom' during his State of the Union address | Read more: https://t.co/ob4kjw0HsN pic.twitter.com/Mx58U9s00F
— RTÉ News (@rtenews) March 2, 2022
Verbally and financially beating up the Russians may impress some of the people, some of the time, but most of the people, most of the time are more concerned with the domestic economy and their place in it. In particular, they are seeing their standard of living hauled backward by inflation running at 7.5%.
Whilst war, inflation and Covid-19 are not the best materials to try and build a comeback with, Mr Biden nevertheless gave it a good shot. His aim is to tweak and rebrand his economic master plan in order to get it past a bitterly divided congress - and some objectors in his own party.
Now the emphasis is less on remaking the US and the world with it, more on fixing the cost of living crisis. His pitch? The way to deal with inflation is not to cut wages and make Americans poorer, it is to spend the money needed to reboot the American economy, and cut costs.
Starting with the cost of prescription medicines. And childcare - he said American parents can spend up to $14,000 per year per child on child care: a huge disadvantage when it comes to getting people, particularly women, back into the workforce after the pandemic. And the cost of elder care in care homes (with quite a swipe at Wall Street firms taking over nursing homes for profit). Familiar problems for an Irish audience.
Some familiar solutions proposed by the President as well - spending on infrastructure - roads, bridges, water and energy systems - all justified now as needed to reboot the economy. He said America used to have the best infrastructure in the world, now its ranked in 13th place. Without infrastructure spending, he said America will not get the private investment it needs to outgrow its current economic difficulties.
The large bill for all this spending will come from a planned reform of Corporation Tax. He made much of his role in brokering the OECD agreement on a minimum corporate tax rate of 15%, saying it meant US companies could not avoid tax by sending jobs and investment overseas. How exactly this is to be done is of vital national interest to Ireland, which has benefitted greatly from US jobs and investment.
Also of interest to the Irish was the presence in the public gallery of Intel CEO Pat Gelsinger, there to support the President's announcement of a huge Intel investment, and the prospects of an even bigger one if Congress passes some legislation.
Mr Biden said: "If you travel 20 miles east of Columbus, Ohio, you’ll find 1,000 empty acres of land.
"It won’t look like much, but if you stop and look closely, you’ll see a "Field of dreams," the ground on which America's future will be built.
"This is where Intel, the American company that helped build Silicon Valley, is going to build its $20 billion semiconductor "mega site".
"Up to eight state-of-the-art factories in one place. 10,000 new good-paying jobs.
"Some of the most sophisticated manufacturing in the world to make computer chips the size of a fingertip that power the world and our everyday lives.
"Smartphones. The Internet. Technology we have yet to invent.
"But that’s just the beginning.
"Intel's CEO, Pat Gelsinger, who is here tonight, told me they are ready to increase their investment from $20 billion to $100 billion.
"That would be one of the biggest investments in manufacturing in American history.
"And all they’re waiting for is for you to pass this bill".
For the moment many of the President's plans are stalled in Congress, the bitter partisan politics making it difficult for some (but not all) measures to pass (Mr Biden mentioned the 80 bills he signed into law over the past year after passage through Congress).
Much of his speech was a barely coded message to Congress to find a way to back his spending plans (and the tax reforms to pay for them), wrapped in a popular appeal to ordinary Americans that these plans will be good for their standard of living and job prospects.
Over the past few days commentators here have been billing this speech as a make or break moment for the Biden Presidency. With approval ratings languishing in the 37-44% range, Mr Biden is second only to Donald Trump in the unpopularity stakes one year into the job. He make take heart from the fact that Mr Trump came so close to winning a second term.
But before that, he and his party face the test of midterm elections in November.
Mr Biden's fightback started overnight. But he has fastened his fortunes to the fickle winds of war.
In truth, he had little choice, though he has the benefit of a 40 year career on the frontline foreign policy to prepare for this moment.