(CNN) Italian police have arrested the captain of a rescue ship carrying dozens of migrants rescued near Libya, after a weeks-long standoff between the vessel and authorities came to a climax off the island of Lampedusa.

Carola Rackete, the German captain of Sea-Watch 3 , was led off the ship in handcuffs after forcing the vessel into the Italian port without permission in the early hours of Saturday morning.

The ship had been stranded in the Mediterranean Sea for more than two weeks, and had defied an order from Rome blocking it from coming ashore given the desperate situation of the 40 migrants aboard. It will receive a fine between 20,000 and 50,000 euros ($23,000 and $57,000) and will be confiscated, Italy's Interior Ministry announced in a statement.

Carola Rackete is arrested after disembarking from the vessel.

Italy's populist Interior Minister Matteo Salvini celebrated Rackete's arrest, declaring "Mission accomplished," while the country's foreign ministry said five EU countries had agreed to take in the migrants.

"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 posted to Twitter shortly before docking the ship. "I have decided to enter the harbor, which is free at night, on my own."

Read More