A Hungarian court has sentenced a Syrian-Cypriot man to seven years in prison for illegally crossing the border from Serbia in September 2015.
Ahmed Hamed was also convicted of being an accomplice in “terrorist acts”.
Prosecutors said he had used a loudspeaker to address hundreds of migrants who then rushed through a gate in a newly completed border fence.
Amnesty International condemned Hungary for using anti-terror laws against refugees and migrants.
The incident in 2015 led to clashes between migrants and Hungarian police, who deployed tear gas and water cannon to push the migrants back.
“We did not go to the border to cause problems,” Hamed was quoted as saying by local news website Index. “Neither my culture, nor my religion would encourage that.”
Also in September 2015, a Hungarian camerawoman was filmed kicking out at migrants as they rushed past. The same court in the town of Szeged gave her three years’ probation for that.
Accusations of racism
The incident involving Mr Hamed is often mentioned by right-wing Prime Minister Viktor Orban when he talks of the need to “defend” Hungary’s borders.
He described Hamed as a “terrorist” last year.
Mr Orban is campaigning on an anti-immigrant platform ahead of an election on 8 April that he and his nationalist Fidesz party are expected to win.
Fidesz has fiercely opposed European Union quotas designed to distribute migrants across the bloc, saying they pose a threat to Western values and culture.
Its stance has led to accusations of racism from the United Nations human rights chief.
Responding to the court’s decision, Eda Seyhan of Amnesty International said it reflected “the dangerous confluence of Hungary’s draconian counter-terrorism laws and its merciless crackdown on refugees and migrants.
“Ahmed, who was simply trying to help his family flee Syria, has been unjustly demonised both inside and outside the courtroom. None of the evidence against Ahmed constitutes ‘an act of terror’ and his conviction is a blatant misuse of terrorism-related provisions.
“This absurd decision comes as a devastating blow for Ahmed, his wife and his two young daughters.”
The holder of a Cypriot passport and so an EU citizen, Mr Hamed was allowed to enter Hungary without a visa but was at the border to help relatives and other Syrian citizens, news agency MTI quoted his lawyer as saying during the trial.
More than one million migrants entered the EU in 2015, most of them passing through Hungary.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.