Judge Alessandra Vella said that Carola Rackete, 31, was carrying out her duty to protect life by bringing the rescued migrants to port, in a decision that angered Italian Interior Minister, Matteo Salvini.
Rackete was arrested after she docked the rescue ship of German non-profit group Sea-Watch at the Italian island of Lampedusa on Saturday, 17 days after rescuing the migrants off the coast of Libya.
Italian port authorities had repeatedly denied Rackete’s request to enter the port.
After deciding her passengers could remain at sea during an extreme heatwave no longer, she steered into the Lampedusa port without authorisation.
Rackete had been under house arrest since Saturday and had faced up to 10 years in prison on possible charges of endangering the lives of four policemen.
She could still face separate charges of aiding illegal immigration.
The vehemently anti-migrant Salvini, who also serves as deputy prime minister, had previously banned ships conducting humanitarian rescue missions from Italian waters and ports, arguing that the boats encourage human trafficking.
“I am indignant, I am disgusted, but I will not give up,” Salvini said in a statement, adding that he had expected stronger action by the Italian justice system.
“We will restore honour, pride, wellbeing, hope and dignity to Italy, whatever it costs,” he added.
Salvini pledged to send “the criminal captain Carola Rackete” back to Germany “because [she’s] dangerous to national security,” ANSA quoted him as saying.
But an immediate expulsion appeared unlikely, as prosecutors in Sicily plan to interrogate Rackete on July 9 for a related probe of allegedly abetting illegal immigration.
While depicted by Salvini as a criminal, Rackete has become a dreadlocked heroine in her homeland, Italy and elsewhere in Europe.
Supporters in Italy and Germany pledged over €1.3 million after a pair of German TV personalities started an online fundraiser for her and for Sea-Watch.
Sea-Watch said the money would be used in future rescue operations.