ROME (AP) — A court in Sicily Friday found Italian Vice Premier Matteo Salvini not guilty of illegally detaining 100 migrants aboard a humanitarian rescue ship in 2019, when he was interior minister.

The court in the city of Palermo dropped all the charges against Salvini in relation an incident in 2019, when he refused to allow the migrants to leave the Open Arms rescue ship at Italy’s southernmost island of Lampedusa.

Verdicts in Italy are only considered final once all appeals are exhausted, a process that can take years.

Now transport minister in Premier Giorgia Meloni’s far-right-led government, Salvini has always defended himself, saying he acted to protect Italy’s borders.

“Protecting our country’s borders from smugglers is not a crime,” the leader of the right-wing League party said shortly after the verdict. “This is a victory for the League and for Italy.”

Premier Meloni also expressed her “great satisfaction,” saying in a statement that the verdict “shows how the accusations against Salvini were baseless and surreal.”

Salvini had always stated he didn’t plan to step down in case of a guilty verdict, but such an outcome would have dealt a big blow to Meloni’s government.

He has the strong support of the premier, other government ministers and anti-migrant European lawmakers, as well as Elon Musk, who expressed his sympathy for the Italian leader in a message on the social media platform X.

During the 2019 standoff, some of the migrants threw themselves overboard in desperation as the captain pleaded for a safe port nearby. The remaining 89 people onboard were eventually allowed to disembark on Lampedusa by a court order.

Salvini took a hard line against migration as interior minister from 2018-2019 in the first government of former Premier Giuseppe Conte. He refused permission for humanitarian rescue ships to dock and accused the groups that rescued migrants at sea of effectively encouraging smugglers.