A Hungarian court Tuesday handed one-year jail sentences to four migrants who forcibly entered the country in January after tearing down a border fence.
The two Syrian and two Palestinian men were part of a group of over 50 people who attempted to enter Hungary from Serbia at the Roszke border crossing on January 28.
An appeals court in the southern city of Szeged also ruled that the four men should be deported and banned from entering Hungary for two years once they have served their sentences.
Police camera footage showed the group, many wearing backpacks, pulling down a wire fence and running into Hungarian territory, after which a police officer fired several shots in the air.
Most of the group retreated into Serbia but the four entered Hungary and were arrested.
In 2015, at the peak of the migration surge in Europe, would-be migrants and asylum seekers clashed with Hungarian riot police at Roszke after the border was sealed with a razor wire-topped fence.
Hungary's hardline anti-immigration Prime Minister Viktor Orban says he is defending a border of the EU's passport-free Schengen zone.
But he has been criticised by Brussels and rights groups for his tough border policy.
In May, the EU's top court forced Orban to close two so-called "transit zone" camps for asylum-seekers at the Serbian border which it said amounted in legal terms to unlawful detention.