European leaders spoke out against nationalism and protectionism at the World Economic Forum in Switzerland on Thursday, taking veiled swipes at President Trump ahead of his Friday speech at the gathering of global leaders in business and politics.

Speeches by Germany’s Angela Merkel, France’s Emmanuel Macron and Italy’s Paolo Gentiloni cautioned against a return to protectionism and extolled the virtues of cooperation on issues such as trade and climate change one day before Trump is expected to bring his “America First” message to Davos.

Since he was elected a year ago, Trump has pulled America out of international agreements on trade and climate change, threatened to upend former President Obama’s agreement with Iran to curb the Islamic Republic's nuclear program and disturbed some European countries that have traditionally seen the U.S. as a leader in setting global partnerships since the end of World War II.

Merkel, who has struggled to form a governing coalition in Germany, evoked the two world wars and questioned whether the West had learned the lessons from those conflicts.

AT DAVOS, AL GORE DEFENDS TRUMP'S SOLAR TARIFF

“We are seeing nationalism, populism and in a lot of countries a polarized atmosphere,” Merkel told the packed auditorium, Reuters reported.

“We believe that isolation won’t help us. We believe we need to cooperate, that protectionism is not the answer,” she said, asking, “Have we really learned from history, or haven’t we?”

Macron received a standing ovation from the crowd of CEOs, bankers and top academics, after he called for a “global compact” to address the economic forces that have led to rising inequality and a surge in populism.

“We have a situation where people are being told, on social and financial issues, that the answer is to do less, to cut our taxes, there is no limit, it’s a race to the bottom,” Macron said, not long after Trump pushed through a large cut in corporate taxes that is meant to create jobs and lure investment to the U.S.

“If we aren’t able to agree a standard of international cooperation, we will never convince the middle class, the working class that globalization is good for them," Macron said.

When Italy’s Gentiloni was asked what his message to Trump would be, he said that it was legitimate to defend one’s own citizens, companies and economy, but “there is a limit.”

Europe, which has been dealing with a range of crises including a massive influx of migrants and refugees, turmoil in Ukraine, Brexit and ongoing questions about the union’s ability to function, is feeling more confident these days.

“Europe has been a phenomenal story this year,” Harvard economist Kenneth Rogoff reportedly told the forum this week.

Despite the fact he’ll be the guest at Trump's first state dinner in April, Macron took a tongue-in-cheek swipe at Trump.

The 40-year-old French president joked about heavy snowfall in Davos, saying it might lead some people to question whether global warming was really a problem.

“Fortunately you didn’t invite anybody skeptical of global warming this year,” Macron said to laughs.