US President Barack Obama has said he would vote for Chancellor Angela Merkel if he could and she were to stand for re-election next year. Speaking at their joint press conference in Berlin on Thursday, the president reiterated his praise for her as an "outstanding partner."

Merkel said while she and the president had not always seen eye-to-eye, they had worked together on a series of issues including protecting privacy in the fight against terrorism and pushing for trade agreements.

"It's hard for me to say goodbye" to Obama, Merkel said, thanking him for eight years of "close and friendly cooperation."

The two leaders tried to strike a reassuring tone during the farewell press conference, stressing the importance of international partnerships in the face of the uncertainties presented by Donald Trump's election in the United States.

Questioned by reporters on the future relations between the US and Russia under Trump, Obama said, "In order for us to solve many big problems around the world, it is in our interest to work with Russia." But he added that he hoped the future president would stand up to Russian President Vladimir Putin when he deviates from US "values and international norms."

Addressing the rise of populism around the world, the president called on citizens both in the United States and Europe to engage with democracy every day, not just "when there's an election."

Obama also told Merkel that Germany "should be proud of" its handling of the migration crisis, which "tells the story of incredible achievement that the German people have embarked on."

Watch video 01:15 'NATO is a commitment that doesn't change'

Merkel began the press conference by thanking Obama for their eight-year partnership, and reiterating a number of the mutual achievements of his tenure, not least the Paris climate deal. "I'd like to thank him for a good, friendly, and intensive partnership," the chancellor said, especially in "difficult times."

Farewell trip

The press conference followed a meeting between the two leaders, in which Merkel likely had one big question for Obama: what he made of Trump, and what his successor's presidency will mean for Germany's relationship with the United States.

Unlike Obama's celebrated visits to the German capital in the past, the president did not address crowds. Instead, he contented himself with dinner with Merkel on Wednesday evening and spent the night in the Hotel Adlon just meters from the Brandenburg Gate (under the watch of some 5,000 additional police officers, who reported no incidents).

On Thursday morning, he gave an interview to German public broadcaster ARD and "Spiegel" magazine before he was received at the Chancellery in the afternoon.

In full interview, Obama once again praised the German chancellor: "She has great credibility, and she is willing to fight for those values in a way that is very, very important," he said. "I'm glad that she's there and I think the German people should appreciate her. Certainly, I've appreciated her as a partner."

The president also addressed the fears of globalization that have been exploited by far-right populist campaigns around the world. "If the global economy is unresponsive to people who feel left behind, if inequality continues to grow, then we could end up seeing more and more of these divisions arise throughout advanced economies around the world," Obama said.

The two leaders are expected to give a joint press conference in the early evening, following a 90-minute discussion covering the entire gamut of world crises, from Syria to Ukraine to the rise of the populist right across the world - as well as the radically different working relationship that Merkel can expect to share with Trump next year. The Republican president-elect repeatedly criticized Merkel's attempts to abide by the principles of German asylum law during his election campaign.

Sticking together

In a joint op-ed for "Wirtschaftswoche" magazine published on Thursday, Obama and Merkel stressed the two nations' "shared commitment to personal freedom and dignity, which only a vibrant democracy under the rule of law can guarantee."

Obama is a very popular figure in Germany

"Our countries share a joint responsibility to protect and preserve our way of life," the two leaders wrote, before listing the institutions threatened by the advent of a Trump presidency: from NATO to the Paris climate agreement. There was also a note of reassurance: "Today we find ourselves at a crossroads - the future is upon us, and we will never return to a pre-globalization economy."

Merkel and Obama have been taking pains to underline the importance of US-German economic ties, particularly in the face of the threat to the TTIP trade deal. During Thursday's press conference, Merkel admitted that the negotiations would not be concluded in the remaining weeks of Obama's presidency. And even though Trump has already signaled his opposition to it, she added, "I am sure that one day we can come back to it."

"Since 2015, the United States has become Germany's most important trading partner with a trade volume of 173 billion euros [$185 billion], and conversely, Germany has become a cornerstone of US economic relations with the European Union," the leaders wrote. "Behind these impressive figures are millions of companies and employees who produce these traded goods and services and whose jobs depend on them."

On Friday morning, Obama will return to the chancellor's office for a round of talks with other European counterparts: French President Francois Hollande, Italian Prime Minister Matteo Renzi, Spanish Prime Minister Mariano Rajoy, as well as British Prime Minister Theresa May will all attend. This time, the center of the discussion will be the future of TTIP - and whether it has one under Trump.