U.S. President Donald Trump’s forthcoming trip to Poland matters. He is visiting Warsaw on July 6, his first stop in Europe before heading to the G20 summit in Hamburg, Germany. There, Trump will hold talks with Russian President Vladimir Putin, his first since entering the White House in January.

While in Poland, Trump will attend a summit of the Three Seas Initiative. It is aimed at expanding and modernizing energy and trade links among twelve countries that border the Baltic, Adriatic, and Black Seas. This summit makes sense. These countries have been far too slow in constructing seamless transportation and energy connections, not least because of a lack of political will and unity.

But without substantial financing from the EU, it is hard to see this initiative getting off the ground, unless China, which is becoming an important investor in the region, steps in. That is something that Trump would not encourage. Relying on Chinese investment would in some ways replace these countries’ dependence on Russian energy. Hence the broader significance of Trump’s visit to Poland.

Polish leaders and (some) others attending the Three Seas Initiative will ram home the point that Russia has destabilized parts of Eastern Europe by annexing Crimea and occupying parts of eastern Ukraine in 2014. Those moves have fundamentally undermined Europe’s post-1989 security architecture.

NATO has responded by beefing up the defenses of the Baltic states and Poland, with the United States playing a leading role. That U.S. role is not expected to be reduced under Trump. “President Trump has demonstrated a commitment to American alliances because strong alliances further American security and American interests,” said H. R. McMaster, the U.S. national security adviser, during a White House briefing on June 29.

Indeed, before Trump meets Putin, this is also a chance for leaders to unite and explain how Russia is spreading disinformation, supporting far-right movements, and making every effort to weaken further the countries in the Western Balkans. In short, this is an opportunity to give Trump a thorough, unjaundiced briefing about what is taking place in Europe.

The problem is that Poland, for one, has a jaundiced view of the EU. Jarosław Kaczyński, the leader of the governing Law and Justice party, said in a recent interview that he wanted to claw back sovereignty from Brussels to Warsaw. Poland might have been in good company among other Euroskeptic and populist movements in Europe a few months ago. But the elections in the Netherlands and especially France, combined with the disastrous mess Britain has gotten itself into by voting to leave the EU, have left Poland weaker, not stronger, in the union.

The EU, for its part, is finally becoming more confident about its future as French President Emmanuel Macron takes the lead in pushing Europe forward. In that context, Law and Justice’s determination to curb the powers of the country’s independent institutions, such as the constitutional court, the media, and the judiciary, has increased Warsaw’s isolation in the EU. But such measures have also increased the EU’s impatience with Poland. Warsaw still believes it can run roughshod over the rule of law while gladly accepting the EU’s structural funds, which have been instrumental in modernizing Poland’s infrastructure and attracting investment. There is a growing sense in Paris and Berlin that Poland cannot have it both ways.

For now, Kaczyński seems oblivious to the criticism from other EU governments. Poland’s nationalist conservative government is obsessed with seeking revenge against those liberals in the Solidarity movement who in 1989 paved the way for a peaceful transition from one-party Communist rule to democracy. The government rarely lets up in criticizing the EU and questioning EU values, including basic human rights, and the union’s policy toward refugees. For all that, Polish leaders can now show their EU counterparts that Trump’s visit to Warsaw proves that Poland is not isolated. So determined is the government to make the visit a big celebration that it is busing in people from the provinces.

Yet Poland’s future is in the EU, while the United States—for the moment—is Warsaw’s security provider. Poland’s economy, investment, and trade are inextricably tied to the EU. Any belief that the United States could become the country’s main economic or political partner is fanciful.

Watch out for the energy issue, however. If there is one big topic that unites Kaczyński and Trump it is their opposition to the Nord Stream 2 pipeline, which is owned by Russian energy giant Gazprom and supported by a consortium of European companies led by Germany. Washington has called on Berlin to abandon the project, not just because it prolongs Europe’s and Germany’s dependence on Russian gas, but mainly because the United States wants to export more gas to Europe.

Poland has already begun importing American LNG. Warsaw’s aim to become a hub for such gas in the future cannot be ruled out. In the meantime, Kaczyński will support Trump’s criticism of Nord Stream 2 and hope to stir up more criticism of Germany—never a difficult thing for the Polish government to do. But does Trump really want to pick another fight with German Chancellor Angela Merkel, who will host the G20 summit?