THESSALONIKI, Greece (AP) — A court in northern Greece has sentenced 23 people to prison terms ranging from eight to 1,489 years for smuggling Iraqi and Syrian refugees into the country from the Turkish border in 2015 and 2016.

The Thessaloniki court imposed the longest sentence on a 54-year-old Greek man convicted of running a smuggling ring that arranged the transport of more than 500 refugees in 43 separate cases. Under Greek law, the maximum prison term that can be served is 25 years, regardless of the length of the sentence.

Another 23 people, mainly taxi drivers, were acquitted.

The suspects were rounded up in a July 2016 police operation. Greece was the main entry point into the European Union of more than a million refugees at the height of the 2015 refugee crisis.