Without ever naming president-elect Donald Trump, President Obama and German Chancellor Angela Merkel nonetheless answered his populism and America-first proposals with a defense of globalization, warning that the relationship between their two nations is “at a crossroads,” and their cooperation is critical for a stable, prosperous world.

“Today we find ourselves at a crossroads—the future is upon us, and we will never return to a pre-globalization economy. Germans and Americans we must seize the opportunity to shape globalization based on our values and our ideas. We owe it to our industries and our peoples—indeed, to the global community—to broaden and deepen our cooperation,” the two leaders wrote in a joint op-ed in the German daily Wirtschaftswoche.

The leaders are holding a joint news conference Thursday morning in Berlin. Mr. Obama is on his last foreign trip, which also includes stops in Greece and Peru.

They wrote that both the U.S. and Germany work hard to ensure international law and norms are respected around the world and they underscored their commitments to NATO.

Get Breaking News Delivered to Your Inbox

“Our countries are committed to collective defense within the North Atlantic Alliance (NATO) because we want to preserve the security of the Euro-Atlantic area as a whole,” they wrote.

During the presidential campaign, Trump suggested that European nations must take a more active role in NATO without the U.S. After meeting with the president-elect last week, however, Mr. Obama said Tuesday that Trump is committed to NATO.

In the op-ed, Mr. Obama and Merkel said that both the U.S. and Germany should cooperate on fighting terrorist threats, like the Islamic State in Iraq and Syria (ISIS). In what seemed to be a rebuke of Trump, they said their efforts to provide humanitarian relief and aid for millions of refugees is crucial “because we know it is our treatment of those most vulnerable that determines the true strength of our values.” They also credited their partnership with helping to produce the Paris agreement to respond to climate change.

They added that economic relations between their two countries are “flourishing” but that they must keep working together.

“Simply put: we are stronger when we work together,” they wrote. “At a time when the global economy is evolving more quickly than at any point in human history, and the scope of global challenges has never had higher stakes, such cooperation is now more urgent than ever.”

During his presidential campaign, Trump was critical of the German leader’s decision to open Germany’s borders to let in hundreds of thousands of refugees.

Over the summer he said, “Hillary Clinton wants to be America’s Angela Merkel, and you know what a disaster this massive immigration has been to Germany and the people of Germany.” But in September, he praised the German leader and said he admires her.