A migrant rescue boat blocked in an Italian port for over five months after being seized by the government was released on Thursday, the German maritime rescue group said.

The Sea-Watch 3 was seized by Italy in June after the boat carrying 40 rescued migrants forced its way into port at the island of Lampedusa despite orders to stay away from Italian shores.

“After more than 5 months of blockade in the port of Licata, we are preparing to return at sea,” Sea-Watch tweeted, citing a civil court decision it said had found no legal basis to continue to detain the ship at the Sicilian port of Licata.

In a statement, the nonprofit group said it would return to the area north of the Libyan coast as soon as possible after necessary preparations.

The Sea-Watch’s action in June sparked a public feud with then-Interior Minister Matteo Salvini, leader of the far-right League party, who takes a hard line against migrants.

The captain of the ship, Carola Rackete, was arrested but later released, with Salvini calling her a threat to national security.

Italy, which has frequently complained of having to take the bulk of migrants crossing the Mediterranean, has seen 600,000 migrants reach its coastline from Libya since 2013.

Sea-Watch defended its work as lawful, saying it had been subject to “criminalization, intimidation and blockade.”

“Sea-Watch and other civil rescuers are the only ones upholding the law, which was proven again today,” said Sea-Watch Chairman Johannes Bayer. “We look forward to leaving, and potentially returning to, Italy’s ports without further complication or aggression.”

Two other seized humanitarian boats operated by another NGO, Mediterranea, remain at Licata, the sailboat Alex and the Mare Jonio, since July and September, respectively.