The Sea-Watch 3 charity ship carrying dozens of migrants rescued off Libya forced its way into the Italian port of Lampedusa on Friday night after a lengthy standoff, the charity said.
Sea-Watch spokesman Ruben Neugebauer told AFP the boat's German captain Carola Rackete, 31, was arrested and that the 40 migrants were still on board after the vessel docked.
Rackete was cuffed by police for refusing to obey a military vessel, after manoeuvring the ship into port without permission.
The ship docked despite the best efforts of a coastguard boat to prevent her from doing so by sailing back and forth between the vessel and the pier, according to the Repubblica daily.
While five European countries on Friday agreed to take in the migrants, permission for the Dutch-flagged Sea-Watch 3 to enter port and disembark the migrants did not come.
Sources at the interior ministry, headed by Italy's far-right Matteo Salvini, said he was waiting for precise guarantees on "numbers, timelines and means" of the migrant redistribution before allowing them off.
"Even though in the afternoon the prosecution has opened an investigation against me, at the same time they notified us that they will not help to bring the rescued off the ship," Rackete said in a video statement on Twitter.
"I have decided to enter the harbour, which is free at night, on my own," she added.
Rackete had previously warned she was worried about the psychological condition of those rescued off crisis-hit Libya.
The ship and its captain were met by applause from a group of supporters standing on the pier on Lampedusa.
"It's been almost 60h since we declared a state of emergency. No one listened. No one took responsibility. Once more it's up to us, to Cpt. #CarolaRackete and her crew, to bringing the 40 people to safety," the charity said on Twitter.
With Italy restricting port entry, the Dutch-flagged Sea-Watch 3 has been stuck in the Mediterranean, during a heatwave, since rescuing 53 migrants drifting in an inflatable raft off the coast of Libya on June 12.
The most vulnerable people onboard were evacuated, but Salvini insisted the rest were unwelcome.
On Wednesday, after over two weeks at sea, and as tempers on the small boat frayed, Rackete decided she had no choice but to enter Italian waters illegally to bring the remaining migrants to safety.