Salah Abdeslam, the sole surviving suspect from the 2015 Paris Attacks, has been jailed for 20 years in Belgium over a gunfight that led to his arrest.
Ayari, 24, was also given a 20-year sentence. Both fired on officers who raided a flat in Brussels in 2016.
Abdeslam is being held in a jail in France and is due to face trial there over the Paris attacks themselves.
He had refused to answer questions from the judge in the trial in Brussels, and eventually refused to attend the hearings.
Neither he nor Ayari, a 24-year-old Tunisian national, was in court as the verdict was read out on Monday. Both received the maximum 20-year term requested by prosecutors.
The judge, Marie France Keutgen, said that "there can be no doubt" about the two men's involvement with "radicalism".
She added: "Their intention is clear from the nature of the weapons they used, the number of bullets they fired and the nature of the police officers' wounds. Only the officers' professional response prevented it being worse."