ROME, Italy — The captain of an NGO-run ship carrying 42 migrants rescued in the Mediterranean Sea was detained in Italy on Saturday after the vessel rammed a border police motorboat blocking its way as it docked without permission, officials 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 them disembark at the Mediterranean island of Lampedusa until other European Union countries agreed to take in the asylum-seekers.

Carola Rackete, the 32-year-old ship captain from Germany, had been engaged in a standoff with Italian authorities that reignited a fierce debate over the country’s draconian migration laws and prompted a display of solidarity from some members of the public.

“There are two conflicting laws in Italy,” Rackete said during a live Skype call with the Foreign Press Association in Rome on Friday.

“One is the maritime law, which states that one must save endangered lives at sea. The other one is the law passed by the Italian government, which states that bringing migrants onshore threatens national security."

"For all I know," she added, "saving a life is more important than Italy’s concern for its territorial borders.”

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, Rackete steered her Dutch-flagged 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, who is the head of the right-wing League party, called her actions "incredible."

"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 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.

An image grab taken from a video released by Local Team on June 29, 2019, shows the Sea-Watch 3 charity ship's German captain Carola Rackete being arrested by Italian police, in the Italian port of Lampedusa, Sicily. ANAELLE LE BOUEDEC / AFP - Getty Images

Rackete told the press on Friday that the situation on board the ship was "worsening."

"There isn’t fresh water for everyone to wash," she said. "There are people in need of medical attention.”

“For the migrants it’s not difficult only physically, but also psychologically. Most of them have suffered human rights abuse, and for days now they have been waiting to know their fate," she added.

As of Saturday morning, more than 20,000 people had contributed over $300,000 through a Facebook fundraiser to help Rackete and Sea-Watch cover legal costs.

“We are usually financed by small donors and the protestant church,” Giorgia Linardi, a spokesperson for the group, told Italy’s daily La Repubblica. "Strangely enough, we need to thank Salvini because since the standoff started there was a massive spike in donations,” she added.

Italy has taken hundreds of thousands of migrants in recent years as one of the southern European countries on the front line of Europe’s migration crisis.

The new law, aimed at search and rescue vessels like those of Sea-Watch, introduced a fine of 50,000 Euros — about $57,000 — for captains who defy orders, as well as their potential arrest and prosecution for aiding illegal immigration.

Salvini had already called for the captain to be arrested before Saturday's dramatic events.

“She is a braggart who is doing politics at the expense of a bunch of migrants, who pays her?” Salvini said during an event on Facebook Live last week.

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.