The group, Proactiva Open Arms, said on Twitter its boat was being kept at the Sicilian port of Pozzallo, where it docked on Saturday after rescuing more than 200 people off the coast of Libya.
#ULTIMAHORA Por fin y después de +48h del primer rescate, entramos en puerto #Pozzallo tras soportar una noche más de espera con olas de 2 metros.— PROACTIVA OPEN ARMS (@openarms_fund) March 17, 2018
Afortunadamente,la vida sigue para todxs.Seguiremos protegiendo vidas invisibles #mar,con un alto coste, porque esa es nuestra misión pic.twitter.com/LbWTMtvJrr
A Sicilian prosecutor's office was quoted by Italian media as saying it had opened an investigation against the NGO and impounded the boat.
On Thursday, the rescue ship went to the aid of two boats that were in difficulty 73 miles off the Libyan coast, after being alerted by the Italian coastguard.
But Italian authorities then informed the Spanish group's ship that the Libyan coastguard was in charge and a Libyan coastguard speedboat soon arrived at the scene.
In such cases, the Libyan coastguard frequently intervenes before a rescue ship sent by the Italian authorities arrives.
But an NGO spokeswoman said it was the first time that Italy had actually asked a humanitarian ship to participate in an operation coordinated by Tripoli.
If the rescue is coordinated by Tripoli, the migrants will be sent back to Libya instead of being taken to Italy.
For this reason, the Open Arms vessel refused to hand over the rescued migrants and headed north instead, evacuating a mother and her newborn child in Malta, because they were in need of urgent care.
The ship then arrived in Italy and was allowed to dock on Saturday by the authorities because of the "frail condition of the migrants on board."
According to organisations such as the United Nations Refugee Agency, migrants face appalling conditions in Libya.
A 22-year-old Eritrean, rescued at sea by the Open Arms ship last week after spending 18 months in detention in Libya, died from severe malnutrition just hours after landing in Sicily.