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.

Italy's vice Premier Matteo Salvini speaks to journalists as he leaves a Palermo's law court in Sicily, Italy, Friday, Dec. 20, 2024, after he was acquitted in a first instance trial where he was accused of blocking for 19 days the disembarkation of 147 people, including minors, rescued at sea by the NGO Open Arms in August 2019.(AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP

Italy's vice Premier Matteo Salvini, flanked by his lawyer Giulia Bongiorno, left, speaks to journalists as he leaves a Palermo's law court in Sicily, Italy, Friday, Dec. 20, 2024, after he was acquitted in a first instance trial where he was accused of blocking for 19 days the disembarkation of 147 people, including minors, rescued at sea by the NGO Open Arms in August 2019.(AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP

Matteo Salvini supporters show their party flag in front of the Palermo's court Friday Dec. 20, 2024 as the Italy's deputy premier awaits a verdict for preventing some 100 migrants from disembarking the rescue boat in 2019 when he was interior minister. (AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP

Open Arms founder Oscar Camps arrives at the Palermo's court Friday Dec. 20, 2024 as Italy's deputy premier Matteo Salvini awaits a verdict for preventing some 100 migrants from disembarking the rescue boat in 2019 when he was interior minister. (AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP

Former Interior minister Matteo Salvini leaves the Senate prior to a vote on lifting his immunity for a trial on Aug 2019 Open Arms case, in Rome Thursday, July 30, 2020. (Mauro Scrobogna/LaPresse via AP, File)

Credit: AP

icon to expand image

Credit: AP

Italy's deputy premier, Matteo Salvini, shakes hands with a police upon his arrival at the Palermo's court Friday Dec. 20, 2024 as he awaits a verdict for preventing some 100 migrants from disembarking a rescue boat in 2019 when he was interior minister. (AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP

Italy's vice Premier Matteo Salvini, flanked by his lawyer Giulia Bongiorno, left, speaks to journalists as he leaves a Palermo's law court in Sicily, Italy, Friday, Dec. 20, 2024, after he was acquitted in a first instance trial where he was accused of blocking for 19 days the disembarkation of 147 people, including minors, rescued at sea by the NGO Open Arms in August 2019.(AP Photo/Salvatore Cavalli)

Credit: AP

icon to expand image

Credit: AP