Hungary’s premier may have won a fourth consecutive election victory, but his Russian policy is costing him allies. Poland’s most powerful politician, leader of the ruling Law and Justice party (PiS), Jarosław Kaczyński, said this month that if Orbán “cannot see what happened in Bucha, he must be advised to see an eye doctor.” Polish President Andrzej Duda echoed the criticism.

The denunciations signal a shift in mood from Hungary’s once-reliable political ally. While both countries have long shared a mistrust of what they see as European Union (EU) over-reach in their internal affairs, the situation in Ukraine is rapidly driving a wedge between them.

Both countries are at risk of becoming embroiled in conflict if Vladimir Putin’s aggression expands, but they deal with this danger very differently. Poland unequivocally denounces and is leading the charge to sever it entirely from the wider world. Hungary, and Orbán in particular, is continuing to equivocate, possibly from a fear that Russia might take hostile steps, and possibly because he sank political capital into a special relationship with Putin and is now unwilling to admit its failure.

There are larger forces at work here. Poland borders the Russian enclave of Kaliningrad, and, since Belarus has come more fully under Russian control, this has added another 250 miles of the border for Russian military use against Poland. Hungary borders only Ukraine and it is unlikely that Russian troops are capable of conquering this western region of the country. The Russian military threat is, therefore, less immediate.

History also matters, a lot. It is not a sustainable position for Polish politicians to adopt a dovish stance towards the country that allied with Nazi Germany to erase it from the map, slaughtered its officer corps at Katyn, and held it in bondage for 40 years. And on a more personal level, Kaczyński is vehemently anti-Russian and holds the Kremlin responsible for the 2010 Smolensk plane crash which killed his brother.

If Poland’s historical resentment is focused on Russia, Hungary’s is focused on the 1920 Treaty of Trianon, the price it paid for defeat in World War I. The treaty left millions of ethnic Hungarians living in neighboring countries. The settlement has long been loathed in Hungary and has provided rich pickings for politicians like Orbán, who give voice to that sentiment by declaring himself the defender of Hungarians abroad (including in Ukraine) and offering them passports from the mother country — a familiar tactic from Putin’s playbook. Orbán has been eager to cultivate the image of a statesman enjoying good relations with Putin and Russia, and argues that the Hungarian people have benefitted from this.

Back in 1989, Orbán helped rake the embers of the Hungarian revolt with his speech commemorating Hungary’s revolutionary leader in 1956, Imre Nagy, who was murdered by the Russians. His shift in focus was made clear on the 60th anniversary of that revolt in 2016, when Orbán that the greater threat to national sovereignty now came from the EU. “People who love their freedom must save Brussels from Sovietisation, from people who want to tell us who we should live within our countries,” he said, in reference to EU migration policies. He has condemned Russia’s invasion, but has attempted to take the middle ground, as a neutral figure — even a peacemaker — between Ukraine (and the West) and Russia.

For many in Europe, the middle ground no longer exists and his position is widely viewed as tantamount to siding with Russia. Hungary’s premier has repeatedly stated that the country will not support Ukraine with military equipment, unlike many of Hungary’s EU and NATO allies, including Poland, and has also refused to back an EU embargo on Russian oil and gas imports. Approximately 85% of Hungarians use natural gas as their primary energy source, most of it supplied on favorable terms from Russia.

The dependence is undeniable, but it is hardly unforeseen: Orbán’s government has chosen repeatedly to put itself in the position of reliance on Russia, even negotiating a new energy deal two weeks before the invasion and pushing ahead with the deal to build a new Russian nuclear reactor.

Inevitably then, the illiberal allies have reached a fork in the road and have been forced to address the question — who do you fear more, Russia or the EU? They have different answers. Poland sees its NATO obligations as the primary commitment, while Hungary at first resisted the presence of a NATO battlegroup on its soil, describing it as unnecessary, and then rather dismissively insisted it be based in the country’s west, far from the Ukraine border.

The result is a newfound coolness between the two. Poland has distanced itself from Hungary and from Orbán, as have other Visegrád Four allies like the Czech Republic. This distance may ultimately help ease the EU’s sometimes fraught relationship with Poland. Outsiders are taking note.

The week after Orbán’s electoral victory, European Commission President Ursula von der Leyen announced the European Commission will cut funding worth billions of euros to Hungary in response to rule-of-law issues. By contrast, EU Commissioner Elisa Ferreira, who paid a visit to Poland earlier this month, lauded the country’s openness to refugees and promised EU funding for food and shelter. “It is a pride for Europe to have such people,” she said, her words a far cry from 2018 when EC President Jean-Claude Juncker described Poland as racist for resisting developing world migrant quotas.

US President Joe Biden also used his trip at the end of March to praise Poland’s response to the war, a volte face from his words a little over a year ago, when he said it was becoming less democratic and attacked proposed TV ownership laws. The EU too has been critical of Poland, fining the government for its treatment of the media and courts. But Poland’s assertion of Russia as public enemy number one and its staunch support of Ukraine has given Duda and PiS a golden opportunity to rebrand.

It is not yet clear how this will develop — the two populist leaderships have covered each other’s backs in disputes and may do so again. But Poland is enthusiastically pro-NATO in a way that Hungary very clearly is not. Poland constantly lobbies for more NATO, including deployments on its soil, while Hungary is cautious, if not suspicious.

It is not hard to discern what EU and US diplomats will make of the current split between the governments in Warsaw and Budapest. Given its NATOphilia and critical geostrategic position, there is a clear opportunity to improve relations with Poland.

Hungary’s leader has implicitly acknowledged the risk and has appealed to Poland to stand firm with him: “We cannot remain standing alone in this storm”, he said.

Kaczyński’s take was pointedly the opposite: “We cannot cooperate as we did in the past if this continues,” he said. The relationship could improve, he said, “but only if Viktor Orbán changes.”

Cordelia Buchanan Ponczek is a Clarendon Scholar and doctoral candidate at the University of Oxford, where she is researching public-private investment into extractive industries.