BERLIN — Offering some pointed foreign policy advice to his successor, President Barack Obama expressed hope Thursday that President-elect Donald Trump would stand up to Russia when it deviates from U.S. "values and international norms."

Obama, in a joint news conference with German Chancellor Angela Merkel during his final presidential visit to Germany, said that while he does not expect Trump to "follow exactly our blueprint or our approach" he is hopeful that Trump will pursue constructive policies that defend democratic values and the rule of law.

He said Trump shouldn't "simply take a real-politik approach and suggest that if we just cut some deals with Russia, even if it hurts people or even if it violates international norms or even if it leaves smaller countries vulnerable or creates long-term problems in regions like Syria, that we just do whatever's convenient at the time."

Obama began his presidency with a goal to "reset" ties with Russia, but they eventually plunged to the lowest point since the Cold War over conflicts in Ukraine and Syria.

Trump has spoken favorably of Russian President Vladimir Putin. But he has outlined few specifics as to how he would go about recalibrating ties with the counry.

Merkel, for her part, said she was approaching the incoming Trump administration with "an open mind" and was encouraged that the presidential process in the U.S. was "working smoothly" so far.

In Germany, officials hope the change in presidents will not bring about a significant shift in relations between the two nations or the NATO alliance.

Merkel worked well with President George W. Bush before Obama's election. She talked with Trump by phone after his election, offering him Germany's "close cooperation," but emphasizing it would be on the basis of what she said were shared values of "democracy, freedom, respect for the law and for the dignity of human beings, independently of origin, skin color, religion, gender, sexual orientation or political views."

A joint opinion piece by Obama and Merkel published Thursday in Germany's weekly business magazine WirtschaftsWoche seemed directed as much at the incoming Trump administration in the U.S. as at European nations. In it, the two leaders stressed that the "underlying bedrock of our shared values is strong" even if the pursuit of common goals is sometimes gone about differently.

Obama and Merkel noted that European Union-U.S. trade was the largest between any two partners worldwide, and emphasized that the trans-Atlantic friendship has helped forge a climate accord, provide help for refugees worldwide, form a collective defense under NATO, and strengthen the global fight against the Islamic State extremist group.

Trump, in contrast, has called climate change a "hoax" and said the climate accord should be renegotiated. He promised to tighten rules for accepting refugees, complained the U.S. was paying more than its share to support NATO and has sharply criticized the U.S. strategy for fighting IS.

Merkel and Obama have enjoyed a close relationship over the years, and Obama seems to be counting on the German leader's strength to help counter the isolationist tone voiced by Trump during the election campaign.

The mood for Obama's latest visit was significantly tamped down compared with his first visit to the German capital in 2008, when some 200,000 exuberant fans packed the road between the landmark Brandenburg Gate and Victory Column to hear the then-candidate, in a speech that solidified his place on the world stage.

Obama told Berliners then that progress requires sacrifice and shared burdens among allies.

"That is why America cannot turn inward," Obama told the cheering crowd. "That is why Europe cannot turn inward."

Eight years later, his words seem to have foreshadowed the nationalist, isolationist forces gaining traction in some parts of Europe and punctuated by Trump's victory in the U.S. election.

In Berlin, Obama will also meet Friday with the leaders of France, Italy, Spain and Britain. Obama's last stop on his final foreign tour will be Peru over the weekend.