Hungarian Prime Minister Viktor Orbán attends a news conference after his meeting with Prime Minister of Ukraine Volodymyr Groisman in Budapest, Hungary, November 24, 2016. REUTERS/Laszlo Balogh

For the first time since the Maidan revolution, Ukraine’s road to the transatlantic community is being actively blocked not only by Russia but by an EU and NATO member state as well: Hungary. While Prime Minister Viktor Orbán has been a vocal critic of sanctions and is one of Russian President Vladimir Putin’s strongest allies within the EU, Hungary has generally followed the NATO and EU mainstream in supporting Ukraine politically. That has changed, however, since the adoption of a controversial education act in Ukraine this autumn, which Orbán’s government objects to—but his argument seems more of a pretext to cover up the real cause.

Prior to the approval of the new law, Hungary had been actively aiding Ukraine. Hungary was among the first EU member states to ratify the EU-Ukraine Association Agreement. Hungary’s policy toward Ukraine has largely been in line with that of its Western allies, including voting to support the sanctions and resolutions against Russia. Hungary also supported Ukraine’s visa-free travel to the EU—partially for selfish purposes, of course, given that more than 150,000 ethnic Hungarians live in Ukraine.

Early on, however, there were some controversial moves. In May 2014, right after the annexation of Crimea, Orbán demanded autonomy for Hungarians in Transcarpathia (a territory of Ukraine that belonged to the Austro-Hungarian monarchy until the end of the first World War). This move, unsurprisingly, drew heavy criticism from Ukraine and Poland. In September 2014, just three days after Gazprom CEO Alexei Miller visited Orbán, the Hungarian government temporarily suspended the “reverse flow” gas transfers to Ukraine. And Orbán’s state-owned media often took a strong pro-Russian angle when talking about the Maidan and the crisis in Ukraine.

Despite these factors, until fall 2017 Hungary was with the EU mainstream in its relations with Ukraine. But that before the Verkhovna Rada’s vote on the legislative package on education, which curbs the rights of ethnic minorities to education in their mother tongue. The law states that Ukrainian will be the main language in schools, placing restrictions on teaching in minority languages beyond the primary school level.

After the legislation was passed, Hungarian Foreign Minister Péter Szijjártó declared that Hungary would “block” every issue important to Ukraine in international organizations, including Ukraine’s European and NATO integration, which would be a very challenging process even without these obstacles. Hungary also pledged to initiate the withdrawal of the EU-Ukraine Association Agreement. Following up on these promises, the Hungarian ambassador to NATO indicated that the country cannot approve a NATO-Ukraine meeting at the ministerial level, and it was downplayed to a lower level meeting.

There is no question that the education act is controversial, and some other EU member states also criticized it—with some good reason. Hungary, Greece, Romania, and Bulgaria complained together at the OSCE, as they saw this law as discriminatory. Poland raised criticism as well. But no other country reacted as aggressively as Hungary.

Hungary’s heated reaction was condemned by Germany’s ambassador to Ukraine, although he also agreed that the language provision in the text was a “mistake.” Thirty-seven Lithuanian members of parliament called the Hungarian government’s behavior “unacceptable.” Eleven NATO member countries (the United States was not among them) complained about Hungary’s obsession with Ukraine.

Unsurprisingly, the Kremlin has used the Hungarian position against Ukraine. Putin’s spokesperson Dmitry Peskov referred to the concerns raised by the Orbán government as proof that the law is “ill-conceived.” The Hungarian “veto” in NATO was praised by Russian propaganda channels Sputnik International and RT.

Hungary’s other moves are also suspiciously in line with Russian goals. In Vienna, with Russian Foreign Minister Sergei Lavrov at the same table, Szijjártó asked for the deployment of OSCE observers to Transcarpathia, to monitor atrocities against ethnic Hungarians by Ukrainian nationalists there. It was part of a political game aimed at relativizing Russia’s dirty game in the Donbas by playing the “nationalist Ukraine” card.

But why did Hungary react this way? For both pragmatic and ideological reasons. Betting on doomsday scenarios for Western liberal democracies, Orbán regards Putin as an important ally and illiberal role model. And there are some important energy deals, such as the MET Group project, which are profitable for pro-governmental financial interests. Russia’s Rosatom will build a nuclear power plant in Hungary from a Russian credit line, and the Russian state-owned company is expected to subcontract lucrative deals to economic circles behind the ruling Fidesz party. In the end, the Hungarian government became a tool of Russian foreign policy without recognizing it.

Interestingly, Orbán has stated that there should be “something” between Hungary and Russia—“we may even call it Ukraine.” But as he and his advisors must know, a pro-Russian, formally neutral puppet country would fall short of being a cornerstone of Hungarian national security. With Ukraine’s pro-Western foreign policy orientation, Hungary’s position and security can improve considerably. Thus, it is Hungary’s main security interest to cement this change by aiding the former’s integration process.

By immediately vowing to block Ukraine’s European integration process, Hungary not only shot itself in the foot, but also gave the Kremlin multiple opportunities to achieve its own objectives. Pro-Russian propaganda in Ukraine can claim that membership in the EU and in NATO is unattainable for the country, and the pro-Western Poroshenko administration could be discredited for failing to meet its foreign policy goals.

The Hungarian government must reconsider its approach. Some immediate diplomatic responses were, of course, neccessary. But Ukraine will not join the EU and NATO in the near future, which means that Budapest will have ample time to monitor the implementation of the new Ukrainian education law and negotiate with the incumbent Ukrainian administration before considering hindering Ukraine’s future integration prospects. The Orbán regime should realize that its own policy goals are at stake in Ukraine and pursue its long-term interests over short-term benefits: as one of the states that would profit the most from Ukraine’s integration, Hungary should help its eastern neighbor economically and politically.

The international community, and especially Poland and Bulgaria, should try to convince the Hungarian government to tone down its criticism; policymakers should also conduct diplomacy behind the scenes about their opposition to the education law. The United Kingdom and the United States should communicate clearly with Hungary as well, increasing pressure on the country to be more diplomatic toward Ukraine and more loyal to its Western alliances in this conflict.

The Hungarian ultimatum is contrary to the foreign policy interests of the transatlantic community. It is against the interests of Ukraine. And it is against the interests of Hungary itself. It seems to help only one country’s geopolitical efforts: Putin’s Russia.

Péter Krekó is executive director of the Budapest-based Political Capital Institute; he tweets at @peterkreko. Patrik Szicherle is an external fellow at the Political Capital Institute.