MOSCOW (AP) — Ukraine's president has signed a controversial law on education, causing fury in Hungary which is threatening to block Ukraine's efforts to integrate with the European Union.

The law that President Petro Poroshenko signed late Monday restructures Ukraine's education system and specifies that Ukrainian will be the main language used in schools, rolling back the option for lessons to be taught in other languages. Russia, Moldova, Hungary and Romania expressed concern over the bill when it was drafted, saying that it would infringe of the rights of ethnic minorities.

Ukrainian officials have rejected the suggestion that minority languages will be sidelined. Poroshenko said in a statement on Monday that the law "strengthens the role of the Ukrainian language in education" but also protects the rights of all minorities to get education.

Language has been a politically charged issue in Ukraine where 30 percent of those polled in the 2001 census called Russian their mother tongue. Separatists who occupied large swathes of Ukraine's Russian-speaking east in April 2014 argue that they took up arms against a threat to encroach on their right to use Russian. Ukraine's pro-Western government that took over shortly before that pledged to respect all minorities, and some of its most prominent figures are native Russian speakers.

Hungarian Foreign Minister Peter Szijjarto on Tuesday called Poroshenko's signing of the law "a shame and a disgrace."

"We guarantee that all this will be painful for Ukraine in the future," Szijjarto told Hungarian state news wire MTI in Singapore, where he was on an official visit, vowing to block Ukraine's efforts to integrate with the EU.

There are about 150,000 ethnic Hungarians in Ukraine.

In a separate statement, Hungary's Ministry of Human Resources, which oversees education, called on Ukraine's education minister to hold consultations with the Hungarian minority in western Ukraine, who were left out of the legislative process before the language law was approved.

"Ukraine's leadership is steering its own country not toward Europe, but toward a dead end," the ministry said.

Russian officials have condemned the law, saying that it violates Ukraine's international obligations.

Kremlin spokesman Dmitry Peskov told reporters on Tuesday that Russia views some of its provisions contradicting modern standards.

In Romania, the president last week last week canceled a visit to Ukraine in protest and has also called off a trip to Bucharest by Poroshenko. The 2001 census listed an estimated 400,000 Romanian speakers in Ukraine.

__

Pablo Gorondi contributed to this report from Budapest, Hungary.