Kim Hjelmgaard

USA TODAY

HANNOVER, Germany — President Obama on Sunday defended a controversial trade deal between the United States and the European Union that he wants to finalize before leaving office in January.

Speaking at a news conference with German Chancellor Angela Merkel, Obama said people around the world are unsettled by globalization but that trade has brought tremendous benefits and more jobs.

"When people visibly see a plant lost or jobs lost, the narrative drives a lot of suspicion about these trade deals," he said. "If you look at the benefits for our economies, it is indisputable that they are made stronger."

Obama said it was necessary to complete the Trans-Atlantic Trade and Investment Partnership (TTIP) agreement because 95% of markets are outside U.S. borders. He said he was confident that TTIP could be completed by the end of the year. A separate trade pact covering 12 Pacific rim countries known as the Trans-Pacific Partnership could "start moving forward" once the U.S. presidential election is over, he said.

Obama praised Merkel several times during the news conference before the two leaders then opened the Hannover Messe, the world's largest industrial technology trade fair.

"This is as important a relationship as I have had during my presidency. Angela has been consistent and steady," Obama said. "She has a really good sense of humor that she doesn't always show in press conferences. That's probably why she has lasted so long as a leader. She watches what she says."

He said Merkel was "on the right side of history" for her lenient policies to admit refugees, and she was "courageous" for her handling of Europe's migrant crisis because it was a position that has harmed her political approval ratings.

Obama arrived in Germany on Sunday from London, where me met with British Prime Minister David Cameron, had lunch and dinner with members of the royal family and interjected his opinion into the United Kingdom's contentious debate over whether that country should leave the EU.

Britain will hold a June 23 vote on the issue. The president angered anti-EU campaigners by saying the U.K.'s trade clout outside the 28-member bloc would be diminished.

TTIP's supporters say the trade pact would make it easier and cheaper for companies on both sides of the Atlantic to do business together, as well as provide a much needed boost to the global economy amid persistent, sluggish growth. There is fierce opposition to TTIP in Germany — Europe's largest economy and most important political voice — where it is believed the deal would erode consumer and environmental protections.

About 35,000 people marched in Hannover on Saturday against the proposed deal that would cover more than 800 million people.

Merkel said in the news conference that adopting TTIP was an important step that would allow European economies to grow. "We need to speed matters up now," she said.

Obama gives U.K. 'friendly' advice: Stay in the European Union

While in London, Obama said TTIP would bring millions of jobs and billions of dollars in benefits to both regions. About 300 U.S. companies are attending the trade show in Hannover.

Obama acknowledged that negotiating trade deals was "tough” because countries want to fight for their domestic interests. “The main thing between the United States and Europe is trying to just break down some of the regulatory differences that make it difficult to do business back and forth,” the president said.

A recent survey published by the Bertelsmann foundation, a Germany-based research group, found only one in five Germans favors the proposed trade pact, and one in three would reject it completely. In the U.S., only 18% of respondents oppose TTIP, the report found.

"Support for trade agreements is fading in a country that views itself as the global export champion," said Aart De Geus, the foundation's chairman and chief executive. "Trade is a key driver of the German economy. If it weakens, Germany's economic power as well as its labor market could falter."

Obama and Merkel said they discussed a number of other issues in their meeting Sunday, including the ongoing conflicts in Afghanistan, Libya and Syria.

Obama said American and German thinking was aligned regarding Syria, but they differ over the idea of carving out "safe zones" in Syria for the thousands of people fleeing violence.

“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 chunk of that country,” Obama said.

Merkel previously endorsed the idea.

Obama reassures British tourists over LGBT laws

Obama tells youth to 'reject pessimism' on London trip