An Italian judge on Wednesday dropped the case against a German captain arrested for forcibly docking her ship with migrants on board, the NGO that operates the vessel said.

Carola Rackete was arrested in June 2019 after guiding the Sea-Watch 3 rescue boat into port on the Italian island of Lampedusa, knocking a coastguard boat out of the way to land more than 40 migrants who were blocked at sea for over two weeks.

She acted in defiance of a veto imposed by then-interior minister Matteo Salvini, leader of the far-right League party, under a "closed ports" policy designed to stem the flow of illegal migration onto Italy's shores.

A judge overturned the arrest three days later, saying Rackete had acted to save lives. The decision was later upheld by Italy's high court, although the underlying case was still pending.

On Wednesday, that case against Rackete -- who became a left-wing hero for her actions -- was finally shelved, a Sea Watch Italy spokesman told AFP.

The Sea Watch 3 rescue boat heads for Lampedusa on June 26, 2019
The Sea Watch 3 rescue boat heads for Lampedusa on June 26, 2019 LOCALTEAM / -

Prosecutors in Agrigento, Sicily, had already declared she acted out of necessity with a duty to bring the migrants on her ship to safety.

"With the dropping of the investigation into Carola Rackete, the judge in Agrigento has recognised the need to save human lives," one of her lawyers, Salvatore Tesoriero, told the Adnkronos news agency.

Italy is a prime entry point for Europe-bound migrants with more than 13,000 landing on its shores this year alone, according to Interior Minister Luciana Lamorgese.

Most are from Libya, followed by Tunisia, she told a parliamentary hearing Wednesday, a day ahead of a visit to Tunis with EU home affairs commissioner Ylva Johansson.

The stretch of water between Sicily and North Africa is also one of the world's deadliest migration routes.

Salvini himself faces trial in September in Palermo for kidnapping and abuse of office for refusing to allow dozens of migrants off the Open Arms rescue ship for six days in August 2019.