Italian far-right leader Matteo Salvini avoided trial on Friday on charges he illegally detained migrants at sea, ending one of his legal troubles even as another related case looms.

Judge Nunzio Sarpietro in the Sicilian city of Catania threw out the case against the populist head of the League party, following recommendations in April by the prosecutor that he should not be tried.

Salvini, known for an "Italians first" policy, was accused of abusing his powers in July 2019 when he was interior minister by blocking 116 migrants from disembarking from the Italian Gregoretti coastguard boat.

Salvini had staunchly defended himself, saying he had been defending the country while carrying out his so-called "closed ports" policy amid a surge of migrants arriving on Italy's shores after crossing the Mediterranean.

Salvini was known for his "Italians first" policy
Salvini was known for his "Italians first" policy AFP / Miguel MEDINA

Italy's Senate voted last year to strip the politician of his parliamentary immunity, paving the way for the trial.

After leaving court, Salvini said the ruling shows that "a minister who defended the dignity and the borders of Italy is a minister who simply did his duty".

However, he still faces trial in September in a separate but similar case.

In Palermo, he is charged with kidnapping and abuse of office for refusing to allow 164 migrants off the rescue ship operated by Spanish charity Open Arms for six days in August 2019.

"If there was no kidnapping found in Catania, I don't know why there should be any in Palermo," Salvini said Friday.

Salvini's party takes a hard line on migrants
Salvini's party takes a hard line on migrants AFP / Thomas Lohnes

The decision to throw out the case comes amid a new influx of migrants arriving to the Italy's shores, spurred by warmer weather.

Over the weekend, more than 2,200 migrants from Tunisia and Libya arrived at the island of Lampedusa, spurring Italy's government to appeal to its European neighbours to revive a migrant-sharing deal that lapsed at the onset of the coronavirus pandemic.

In the "Gregoretti" case, migrants who hailed largely from Sudan, including 15 unaccompanied minors, were rescued in the Mediterranean in two separate operations by Italian patrols after five days at sea.

Transferred to the Gregoretti on July 26, they were held on the overcrowded patrol vessel in fiercely hot weather amid a scabies outbreak and a suspected case of tuberculosis, as Salvini insisted they not be allowed to disembark until other European countries agreed to take them in.

Following pressure from Catania's juvenile court, the minors were allowed to leave the ship on July 29, while the remaining migrants disembarked two days later after Salvini said a deal had been brokered with EU countries to take them.

Salvini's League takes a hard line on migrants, arguing that Italy bears an unfair burden as the first point of entry into Europe for those crossing from northern Africa.

When he blocked the ships, Salvini was part of a coalition government and held the positions of interior minister and deputy prime minister.

He has argued that his migrant policy was not his alone, but was agreed by the government as a whole.