A judge has freed the captain of the Sea-Watch 3, ruling that she did not break the law when she forced her way past an Italian naval blockade to enter the port of Lampedusa with a group of refugees.

Alessandra Vella, the judge overseeing the case, said Carola Rackete was carrying out her duty to protect human life when she defied authorities and brought 41 African citizens to shore.

The judge lifted the house arrest which Ms Rackete had been placed under after Saturday’s incident.

The 31-year-old captain, who is a volunteer with German charity Sea Watch, was stranded in international waters for over two weeks, during a standoff with Italy.

The country has closed its ports to private rescue vessels but on Saturday Ms Rackete defied authorities and docked her vessel.

In pictures: A day of refugee rescues in the Mediterranean Sea Show all 7 1 /7 In pictures: A day of refugee rescues in the Mediterranean Sea In pictures: A day of refugee rescues in the Mediterranean Sea A baby being taken on to MSF's Bourbon Argos ship from a boat carrying 130 migrants and refugees Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea A refugee boat carrying 101 people being rescued by MSF's Bourbon Argos Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea A refugee boat carrying 101 people being rescued by MSF's Bourbon Argos all images by Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea A baby among refugees on a boat carrying 185 people off the coast of Libya Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea Migrants and refugees sleeping after being rescued by MSF's Bourbon Argos ship Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea A crew from MSF's Bourbon Argos ship rescuing a boat carrying 130 migrants and refugees off the coast of Libya, at sunrise Lizzie Dearden In pictures: A day of refugee rescues in the Mediterranean Sea A woman in a stretcher being lifted onto MSF's Bourbon Argos ship from a boat carrying 130 migrants and refugees off the coast of Libya Lizzie Dearden

She rammed a police boat on her way to port and has said the collision was an accident.

Despite this Ms Rackete was arrested when she disembarked.

She faced up to 10 years in prison for endangering the lives of the four police officers on board but the judge ruled that she had not committed any act of violence.

The 31-year-old could still face separate charges of aiding illegal immigration.

The ruling is a blow to Italy’s anti-immigration government and its hard-right interior minister, Matteo Salvini.

“I am indignant, I am disgusted, but I will not give up,” he said, after the ruling was handed down on Tuesday.

“We will restore honour, pride, well-being, hope and dignity to Italy, whatever it costs.”

The incident has led to increased tension in Italy’s diplomatic relations with France and Germany.

Germany had earlier requested the captain’s release and a French government spokesperson condemned Mr Salvini’s behaviour on Tuesday.

“Mr Matteo Salvini’s behaviour has not been acceptable as far as I am concerned,” Sibeth Ndiaye told France’s BFM-TV.

Support free-thinking journalism and attend Independent events

“We are not relieved, we are angry,” Ms Rackete said when the boat first docked in Italy.

“This disembarkation should have taken place more than two weeks ago and it should have been coordinated instead of hindered by the authorities.

“European governments in their air conditioned offices have gambled with these people’s lives for more than 16 days. Not a single European institution was willing to assume responsibility, until I was forced to do so myself.”

An online fundraising campaign to help her, launched by two German TV stars, has so far raised almost a million euros (£896,000), while a separate fundraiser launched on Facebook by an Italian group has raised 435,000 euros (£389,000) in seven days.