As if relations between Warsaw and Berlin were not bad enough.

On September 11, the Polish government said it had the right to demand reparations from Germany for the loss of life and damage it suffered during World War Two. That, Warsaw argued, was the conclusion of the parliament’s research service.

Over 6 million people, including 3 million Jews, were killed during the Nazi occupation of Poland, not to mention the immense destruction of several cities.

Poland’s governing Law and Justice Party said that in 1953, when Poland was under communist rule, it was bullied by the former Soviet Union not to seek reparations from what was then West Germany. Mariusz Błaszczak, the Polish interior minister, said that material losses from the Nazi occupation of Poland amounted to $1 trillion.

Following World War Two, Poland gained a fifth of German territory, while the Soviet Union annexed one third of prewar Poland, which are in today’s Ukraine and Belarus. It was only in 1990 that Poland and Germany signed a postwar border treaty in which Germany recognized the country’s post-1945 borders.

Germany considers the reparations matter closed.

Chancellor Angela Merkel’s spokesperson, Steffen Seibert, said Berlin has already paid in war reparations on an “enormous scale.” “In the German government’s view, there is no reason to doubt the validity under international law of the act of declining reparations 1953,” Seibert said. “Therefore this question is in our view resolved both legally and politically.” The Polish government is unlikely to accept that statement, particularly at a time when Warsaw is pursuing its own nationalist agenda.

Ever since Law and Justice was elected two years ago, the party has tried to consolidate its power and influence by undermining the independence of the judiciary and reining in the media. So much so that the European Commission is now taking legal steps to challenge the Polish government’s policies.

At the same time, the government has notched up its anti-German rhetoric, even claiming that it is German investors, not Poles, who have benefited from the structural and development funds disbursed by the EU to modernize the country’s infrastructure. Since it joined the EU in 2004, Poland has received funds amounting to over €230 billion.

Until recently, German officials refused to counter such anti-German rhetoric, which it also had to endure when the Law and Justice party was in power from 2005 to 2007. But over the past few weeks, Merkel herself has criticized Poland’s stance on the judiciary, not to mention its refugee policy in which Warsaw has refused to accept its quota of refugees. And now the reparations issue.

In the past, Poland’s anti-German rhetoric might not have mattered that much to Warsaw’s standing in the EU. It had enough allies. But Britain’s decision to leave the EU will have a profound impact on Poland.

It’s not just because of the uncertain future of the hundreds of thousands of Poles working in Britain or the fact that the EU’s budget will be reduced.

Warsaw believed that London provided a counterweight to Germany and to the Franco-German axis; that Britain provided a brake to further integration; and that Britain would curb Germany’s leadership in the EU. Now that Britain is immersed in Brexit negotiations, Poland— instead of seeking allies inside the EU—is alienating Germany, the bloc’s most important country. Warsaw is acting against its own interests.

Once the German elections are over, it is expected that French President Emmanuel Macron and the next German chancellor will move quickly toward reforming the eurozone. At the moment, there seems little doubt that the EU is heading toward some kind of two-speed Europe with the eurozone countries taking the lead.

Poland has yet to adopt the euro, so it already believes it will be treated as a second-class member. However, now that Britain is on the way out, Warsaw has few allies inside the EU to win support for its reform proposals, such as the ability for a member to withdraw from individual EU policies—the refugee issue being one example—but at the same time wanting to retain all the benefits of union membership.

Poland’s attitudes are puzzling. This big and important EU country used to support a strong European Commission, or the method communautaire that gives the commission a central role in decisionmaking. Now, Warsaw is more wedded than ever to intergovernmentalism, whereby some member states are pushing for more national sovereignty at the expense of further integration.

As for Warsaw’s decision to open the reparations issue, this will not only exacerbate its already strained ties with Germany. Poland is setting itself up for an enormous row with its eastern neighbors, particularly Ukraine. Kyiv might fear that the Law and Justice party would also question its borders with Ukraine.

Poland’s opposition parties know that the reparations issue is politically dangerous, if not poisonous. Tomasz Siemoniak, deputy leader of the opposition Civic Platform party, said it was a “propaganda game” that would worsen relations with Germany and end up helping Russia. After all, a strong, pro-European Poland inside the EU—that in the past lobbied hard for a strong eastern neighborhood policy and good relations with Germany—was hardly in Russia’s interest.