BUDAPEST, Hungary — A Hungarian court sentenced a Syrian native to 10 years in prison on Wednesday for taking part in a riot after Hungary closed its borders to migrants and refugees last year.

The court in the southern city of Szeged convicted Ahmed Hamed, a Syrian who has lived in Cyprus for about a decade, of committing an "act of terror" by using violence — throwing rocks — to try to force police into letting in migrants.

In July, the 40-year-old man's parents were part of a group also sentenced to prison for allegedly taking part in the rioting on Hungary's border with Serbia in September 2015.

The court also found Hamed guilty of entering Hungary illegally. His lawyers said they would appeal the terrorism conviction, while prosecutors said they would ask for a longer prison sentence.

Dozens of police officers, migrants and some journalists were injured in clashes on the Hungary-Serbia border on Sept. 16, 2015, a day after Hungary closed off the border with a fence and razor wire, stranding hundreds of migrants.

Amnesty International said the court verdict and sentence constituted a "draconian ruling" and reflected the "appalling treatment of refugees and migrants" in Hungary.

"A father who was trying to help his elderly Syrian parents reach safety now faces 10 years in prison," Gauri van Gulik, the group's deputy director for Europe, said. "Throwing stones and entering a country irregularly does not constitute terrorism and cannot justify this draconian ruling."

Hungary later extended the deterrence fence to parts of its border with Croatia, but only after nearly 400,000 people passed through the country on their way to Western Europe.

The government of Prime Minister Viktor Orban, who has described migrants as "poison" and Muslim refugees as a threat to Europe's Christian culture, has since introduced increasingly harsh immigration rules.

Over the past year, for example, Hungary has made deep cuts in assistance for even recognized asylum seekers. Police since July have summarily expelled migrants caught within 8 kilometers (5 miles) of the country's borders.

At the same time, special border checkpoints process only up to 30 asylum claims a day, while several hundred asylum seekers sometimes are waiting on the Serbian side.