Ukraine's president has signed an education law that critics say will infringe on the rights of ethnic minorities.

Petro Poroshenko's office said in a statement late Monday that the law "strengthens the role of the Ukrainian language in education."

The bill sparked concerns in Hungary, Romania, Russia and Moldova. Hungary's foreign ministry called it a "stab in the back" while Romania's president last week canceled a visit to Ukraine in protest and has also called off a trip to Bucharest by Poroshenko.

The law 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. Ukrainian officials have rejected the suggestion that minority languages will be sidelined.