The captain of a humanitarian ship with 40 migrants aboard was detained in Italy after the vessel rammed a border police motorboat blocking its way as it docked without permission at the Mediterranean island of Lampedusa early Saturday, authorities said.

The migrants finally stepped onto Italian soil after disembarking from the Sea-Watch 3, which rescued them more than two weeks earlier. Italy’s anti-migrant interior minister, Matteo Salvini, had refused to let the migrants disembark on Lampedusa until other European Union countries agreed to take in the asylum-seekers.

After 17 days at sea, the migrants hugged the crew and kissed the dock upon arrival on the island, which is closer to northern Africa than to the Italian mainland.

After five countries offered on Friday to take in the migrants, but still without any disembarkation permission, the Dutch-flagged Sea-Watch 3’s captain, Carola Rackete, steered her rescue vessel toward Lampedusa’s dock before dawn Saturday, hitting the much smaller motorboat from the border protection force.

She was immediately whisked away by police and detained for investigation of alleged violence against a war ship, and allegedly attempting to cause a shipwreck by plowing into the police boat, the Italian news agency ANSA said.

Salvini called her actions “incredible.”

A handout photo made available by Sea-Watch on Thursday shows migrants holding banners asking for ‘Open Ports’ and ‘Open Hearts’ while at sea in the Mediterranean. The vessel entered Italian territorial waters on Wednesday near the island of Lampedusa with dozens of migrants on board. (Sea-Watch/EPA-EFE)

“I have asked for the arrest of an outlaw who put at risk” the lives of the border police on the motorboat, Salvini told RAI state radio. He added that he also asked authorities to sequester the ship, “which went around the Mediterranean breaking laws.”

The German humanitarian group Sea-Watch rescued 53 people from an unseaworthy boat launched by Libya-based traffickers on June 12. In recent days, 13 migrants were taken off Sea-Watch 3 for medical reasons and brought to Italy for treatment.

Sea-Watch defended the captain’s actions, as did Italian opposition lawmakers who had gone aboard a few days earlier in a show of solidarity to the migrants.

“She enforced the rights of the rescued people to be disembarked to a place of safety,” Sea-Watch said in a statement.

But a Sicily-based prosecutor, Luigi Patronaggio, indicated otherwise.

“Humanitarian reasons cannot justify inadmissible acts against those who work at sea for the safety of everybody,” ANSA quoted the prosecutor as saying.

Compared to ambulance driver

Democratic Party lawmaker Graziano Delrio told reporters after disembarking that Italian judicial authorities will ultimately decide if Rackete broke the law. He likened her actions to that of a driver of a Red Cross ambulance “which goes through a red light” to speed ailing patients to a hospital.

A judge will decide in a few days whether Rackete can be kept under arrest while investigation continues. ANSA said the captain would stay under house arrest in the meantime.

As Salvini has done since Italy’s populist government took office a year ago, he had insisted that no migrant disembark in Italy from a humanitarian rescue ship until other EU countries pledge to accept the migrants while their asylum requests are processed.

On Friday, Italy’s foreign ministry said that five countries offered to take the remaining 40 aboard Sea-Watch 3: Finland, France, Germany, Luxembourg and Portugal.

Salvini contends humanitarian rescue vessels essentially aid Libyan-based traffickers who launch flimsy rubber dinghies and rickety fishing boats overcrowded with migrants, many of them from Africa, eager to reach European shores in hope of a better life.