The charity boat Aquarius became a symbol of European divisions over migration when it was turned away from Italy and Malta.
Hours after a tense EU summit it was heading back into Libyan waters to resume its mission.
Leaders in Brussels eventually agreed that member states would voluntarily open control centres to process migrants that make it to Europe, deciding who could stay and who would be turned back.
European Commission President also made it clear that all sides have to respect the law on the issue:
"On top of that, we have sent a clear message to all vessels, including those of NGO's operating in the Mediterranean, that they must respect the law and must not obstruct the operation of the Libyan coastguard."
The move comes as Libya's coastguard picked up almost 350 migrants and brought them to Tripoli.
The country's western coast is the main departure point for people trying to reach Europe, often on dangerous inflatables.
Some make it- but increasing numbers are intercepted by Libya's EU-backed coastguard and returned to Libya.
At the Brussels summit German Chancellor, Angela Merkel, said despite the agreement on migration there was still work to do and differences to be resolved.
Already Italian Prime Minister Matteo Salvini has said that migrants saved by NGO rescue boats will not be allowed into Italy.