Ahmed Hamed, 40, who pleaded not guilty to a charge of terrorism, cried as he was given his sentence - the longest handed down by a Hungarian court in connection to the migrant crisis.
Hamed was part of a group that crossed illegally into Hungary on Sept. 16 last year and also spoke to the crowd using a loudspeaker before hundreds of migrants forced open the border gate and police fired water cannon and teargas.
Hamed, born in Syria, had lived in Cyprus for a decade and held an EU residence permit, Judge Andrea Nagy told the court. He joined his relatives to help them navigate the Balkans route.
Nearly half of the more than 1 million migrants who surged into the European Union last year passed through Hungary, often causing chaos at borders and along the main migration routes.
Hamed became a leading figure of the migrant crowds at the Serb border, the court said.
Hungarian Prime Minister Viktor Orban was an early opponent of migration, telling the EU to boost border defenses or lose its cultural identity. He built a razor-wire fence and organized a referendum on EU migrant resettlement quotas.
Other migrants have been sentenced in dozens of prior cases but few received jail time and only one remains behind bars after a case connected to the riots at the Roszke border station last year.
None of those migrants were charged with terrorism, a rarely used clause in the criminal code that penalizes forcing action from state actors, such as police, in any way.
A small group of protesters called "Free the Roszke 11" gathered outside the Szeged courthouse to demand the release of Hamed and call attention to what they said were racist tactics by Hungary's government.