BRUSSELS -- A Belgian court on Monday found 2015 Paris attacks suspect Salah Abdeslam and an accomplice guilty of attempted murder over shots fired at police as they sought to avoid arrest in Brussels.

The court handed both Abdeslam, Europe's most wanted fugitive at the time, and Sofiane Ayari the maximum 20-year sentence.

It said the "terror character" was clearly established in the March 2016 shooting, four months after the Paris attacks that killed 130. Abdeslam was close to being arrested in a hideout when he and Ayari fled while another man sprayed gunfire at police and was killed. Three officers were wounded.

His lawyer Sven Mary said it remains to be seen whether Abdeslam will seek to appeal his sentence. He has 30 days to decide. Mary insisted it is unclear whether Abdeslam himself had fired shots at officers trying to break into the hideout.

"If there is doubt, he should have been let go, it's that simple," Mary said.

Abdeslam attended the opening day of the trial in February but has refused to co-operate since. He is being held in a French prison. Ayari was also absent.

It is unclear when Abdeslam will face trial over the Paris attacks but it is expected to take several years.

The conclusion of the case at Brussels' ornate palace of justice took place amid tight security set up by the armed forces and police.

"As all our demands have been met we can be satisfied, said Maryse Alie, a lawyer for the police. "The judgment says that firing at policemen on duty is a very serious crime."

Ayari is a Tunisian who fought with the Islamic State group for a year before heading to Europe. By the time he and Abdeslam began hiding in the upstairs apartment in central Brussels, police had raided more than a dozen locations in Belgium with little to show for it.

On the afternoon of March 15, 2016, they battered down yet another door. This time, it was to the staccato of an assault rifle. An IS fighter opened fire on the officers, who had only service weapons, while Abdeslam and Ayari darted onto a rooftop, broke into a neighbouring apartment and escaped, authorities said.

The fugitives left behind a Kalashnikov, ammunition clips, a cellphone and a tunic -- their DNA was everywhere, according to court testimony.

Three days after the shooting spree, Abdeslam was captured in Brussels. Four days after that, extremists struck in the Belgian capital, killing 32 people in bomb attacks at the airport and on the subway system.