President Barack Obama mounted a strong defence of international trade deals on Sunday in the face of domestic and foreign opposition, saying it's "indisputable" that such agreements strengthen the economy and make US businesses more competitive worldwide.
But he acknowledged that the clock is ticking on his faltering trade agenda.
Mr Obama, on a farewell visit to Germany as president, is trying to light a fire under stalled talks about a trans-Atlantic trade deal, a massive pact that would rewrite the rules for the billions in trade and investment between the European Union and the US.
At a press conference, a trade show and a private dinner with chief executives, Mr Obama tried to counter public scepticism about the unfinished deal with Europe, while also brushing off opposition from the 2016 presidential candidates to a pending Asia-Pacific trade pact.
Despite all that, Mr Obama said: "The majority of people still favour trade. They still recognise, on balance, that it's a good idea."
"If you look at the benefits to the United States or to Germany of free trade around the world, it is indisputable that it has made our economies stronger," Mr Obama said.
The president said he was confident negotiations on the trans-Atlantic trade deal could be completed by the end of year, with ratification to follow. And he said that once the US presidential primary season is over and politics settle down, the trans-Pacific pact, awaiting ratification, can "start moving forward" in Congress.
Mr Obama is pushing to conclude negotiations on the European deal before he leaves office, so that "next president can pick that up rapidly and get that done", he told the BBC in an interview broadcast Sunday.
But it is not certain that the next president would pick up where Mr Obama leaves off on trade.
The trans-Atlantic pact has not been a top issue in the campaign to choose Mr Obama's successor.
And both leading candidates - Democrat Hillary Clinton and Republican Donald Trump - oppose the Asia-Pacific trade pact for its potential impact on American jobs and wages.
Mr Obama is not alone in facing opposition on trade. His host and partner on the daylong campaign, German chancellor Angela Merkel, also is under pressure from critics who claim the trans-Atlantic deal would erode environmental standards and consumer protections.
Thousands of people took to the streets in Hannover to protest against the trade deal on the eve of Mr Obama's arrival.
Throughout the day, Mr Obama and Mrs Merkel stressed their alignment on trade, as well as other matters.
At a press conference, Mr Obama made a strong public show of support for her handling of the migrant issue, saying she was "on the right side of history on this".
Her decision to allow the resettlement in Germany of thousands fleeing violence in Syria and other Mideast conflict zones has created an angry domestic backlash.
Mrs Merkel recently helped European countries reach a deal with Turkey to ease the flow, but she and the other leaders are now under pressure to revisit it.
Mr Obama said Mrs Merkel was "giving voice, I think, to the kinds of principles that bring people together rather than divide them".
But Mr Obama would not go so far as to back her support for establishing a "safe zone" in Syrian territory, saying that would be difficult to put in place.
"As a practical matter, sadly, it is very difficult to see how it would operate short of us essentially being willing to militarily take over a big chunk of that country," he said. "And that requires a big military commitment."
Mrs Merkel has endorsed the notion of creating areas that could provide safe haven for the thousands of migrants fleeing the violence, and said such zones would improve access to humanitarian aid. She insisted the proposal would not require outside intervention, saying safe areas should be part of the Geneva peace negotiations that involve the Syrian government and moderate opposition groups.
Mr Obama - looking to project a united front with a leader he referred to as his "trusted partner" while she called him "Dear Barack" - said he did support using the peace talks to ultimately create safe areas controlled by the moderate opposition, and on that "there's no space between us".
Mr Obama spoke after Mrs Merkel rolled out the red carpet for him at Hannover's Herrenhausen Palace.
His stop in Germany was the last on a six-day trip to the Middle East and Europe. The European leg has shaped up as a farewell tour to some of the leaders and the cities he's frequented as president.
Mrs Merkel timed her invitation to the US president with the opening of the Hannover Messe, the world's largest industrial technology trade fair. Mr Obama led a delegation of business leaders to the trade show and later joined chief executives for a dinner.
He told business leaders gathered for the opening ceremony that when it comes to passing the trans-Atlantic deal, "time is not on our side".
With upcoming elections in the US and Europe, he said, if the pact is not completed now it may not be "for quite some time".
"I know the politics are hard, but we have to keep making our case," he said.