It illustrated the political headwinds now confronting the Canadian oil-infrastructure project: The president voiced his increasingly blunt disdain, and a vocal cheering section from his party roared in approval.
Obama took his latest shot from the biggest political stage of the year, the annual prime-time speech to Congress, with a final decision on the oilsands project expected from him within weeks.
He didn't bother mentioning Keystone by name. But the target was obvious. The president teased Republican opponents who have made a bill on the pipeline their very first priority of the 2015-16 Congress.
It wasn't the first time he mocked the meagre job-creation potential of the project. But it was the first time he publicly teased lawmakers for making it a priority, instead of a massive infrastructure bill he'd rather see.
"Let's set our sights higher than a single oil pipeline," Obama said, drawing cheers from his party and stony silence from his opponents.
"Let's pass a bipartisan infrastructure plan that could create more than 30 times as many jobs per year, and make this country stronger for decades to come."
Later in the speech, he called climate change the greatest threat to future generations.
It was a rare stark passage in a mostly upbeat address.
At one point, the president rattled off a series of encouraging economic numbers with shrinking deficits, growing employment, and expanding stock markets. He mischievously pointed out that this was the exact opposite of what his opponents spent years predicting: exploding deficits and economic decline.
Staring into a congressional chamber now dominated by those Republican critics, Obama added: "This is good news, people."
He topped it off with a playful wink. And when Republicans began a sarcastic cheer later in the speech, as he mentioned that he'd run his last election, the president interjected: "Because I won both of them."
Since the debacle of the November midterm elections for his party, Obama has responded with some of the most aggressive actions of his presidency: reopening relations with Cuba, a climate deal with China, and a controversial executive order deferring deportations for four million immigrants.
His poll numbers have improved since then.
A Wall Street Journal-NBC survey found more optimism now over the economy than at any point over the last decade. It also found that for the first time in two decades a plurality of respondents expressed optimism that the country was headed on the right track. And it found his personal approval at 46 per cent — his highest level in two years, comparable to Ronald Reagan's at the same stage in his presidency, much higher than George W. Bush's, but much lower than Bill Clinton's.
Obama began his speech by trying to frame the story of his presidency.
It's a story his defenders will likely be repeating for his last two years in office, and beyond. The basic narrative chosen by Obama is one of a presidency that began in crisis, and emerged stronger.
"We are fifteen years into this new century. Fifteen years that dawned with terror touching our shores; that unfolded with a new generation fighting two long and costly wars; that saw a vicious recession spread across our nation and the world. It has been, and still is, a hard time for many," he said.
Then, in the key line of his speech, which the White House had flagged in a series of excerpts emailed to reporters earlier in the day: "Tonight, we turn the page."
Jobs are now being created at the fastest pace since 1999, he said. Unemployment is now lower than it was before the financial crisis. More kids are graduating from college, more people are insured than ever, and dependence on foreign oil is lower than at any point in almost 30 years, he said.
But he lamented that too many Americans don't benefit from that growth.
Indeed, the U.S. ranks near the bottom of OECD countries with respect to income inequality. Canada falls just below the average, but that's still significantly ahead of its southern neighbour among the group's 34 countries.
Obama called on Congress to introduce a child-care plan like the one that existed during the Second World War, maternal leave like virtually every other developed country today, and changes to the tax code that move away from benefiting the wealthy in favour of the middle class.
"Middle-class economics works. Expanding opportunity works," he said.
There's almost no chance of Obama's main domestic-policy priorities making it into law. Very little of last year's speech did. But he warned lawmakers a year ago that he would take executive actions where they didn't — and that's what happened.
In one example from the past year, he asked lawmakers to give Americans a raise to a $10.10 minimum wage. They didn't, so he signed an executive order guaranteeing that wage for employees of federal contractors.
Obama also asked for an immigration bill last year. When it was clear he wouldn't get one, he responded by temporarily deferring deportations for more than four million people.
That announcement infuriated his opponents, who called the move unconstitutional. A prominent hawk on immigration, Iowa member Steve King, huffed Tuesday to his Twitter followers that one of the president's guests in the gallery would be "a deportable," a university student whose family is allowed to stay in the country under Obama's order.
With the economy starting to grow, opponents have begun hitting Obama on foreign policy.
Some questioned passages in his speech that celebrated American soldiers being mostly out of Iraq and Afghanistan. They also accused him of exaggerating military successes against ISIL.
They noted the Islamist rebellions raging around the world — with Yemen in danger of political collapse just this week, and murders in places as distant as Nigeria and Ottawa.
The Republican response was delivered by rookie Senator Joni Ernst.
She mentioned the Ottawa attacks, and also Keystone.
"The president’s own State Department has said Keystone’s construction could support thousands of jobs and pump billions into our economy, and do it with minimal environmental impact," said the Iowa rookie, who gained fame last year for a campaign video that referred to her past career as a pig-castrating farmer.
"We worked with Democrats to pass this bill through the House. We're doing the same now in the Senate. President Obama will soon have a decision to make: will he sign the bill, or block good American jobs?"
Tuesday's poll that showed increased economic confidence also asked a question about the pipeline: Two-thirds of respondents who expressed an opinion supported the project.
However, the proportion of those who expressed no opinion was almost as high as the 41 per cent who supported the project.
Also on HuffPost