Italian authorities eventually let nine people from a rescue ship carrying 147 disembark on the Italian island of Lampedusa on Thursday night.
The other rescued migrants were left stuck aboard for a 15th night in a drama that has revealed deep divides in the Italian government.
Italian Prime Minister Giuseppe Conte rebuked his interior minister for being obsessive about closing Italian ports in a migrant crackdown.
Matteo Salvini, who is also Deputy Prime Minister, has won popular support for his hard line against the influx of migrants into Italy.
Spanish rescue organisation Open Arms tweeted that the “urgent” removal of five persons for psychological reasons was authorised and four family members were allowed to accompany them.
The nine were taken ashore by the Italian coastguard but the fate of the other 138 remains unresolved.
“We continue to not have authorisation to disembark the other persons aboard,” Open Arms said. “This will be their 15th night.”
The migrants are sleeping on the crowded ship in what the charity described as deteriorating medical and hygiene conditions.
In an open letter to Mr Salvini, Mr Conte rebuked the League party leader for his “obsessive concentration" on immigration, reducing it to a “closed ports’ formula."
Mr Salvini retaliated, saying he was proud of his obsession and that he was determined to keep Italy safe and its borders secured.
“That’s what Italian citizens pay me for,” he told Sky TG24 TV. “I’d expect a ‘thank you', not a follow-up with insults."
While other private rescue boats have been caught up in standoffs caused by Mr Salvini's policy, the crew and migrants aboard the Open Arms risked becoming collateral damage in Italy's rapidly worsening government crisis.
Last week, Mr Salvini’s League brought a no-confidence motion against Mr Conte’s 14-month-old, populist government.
No date has been set for the showdown in the Senate, which could trigger the government’s collapse.
Earlier on Thursday, Spain and five other nations agreed to take those aboard Open Arms.
But the offers by fellow EU nations did little to calm the political turmoil that could lead to early elections.
The eurosceptic Mr Salvini is aiming for the premiership in his quest to move Italy further to the right.
In the open letter posted on Facebook, Mr Conte accused his interior minister of “disloyal co-operation”.
This week, Mr Conte urged Mr Salvini to let the 32 children on board disembark, but he ignored the appeal.
On Wednesday, a Rome-based administrative court overruled Mr Salvini's ban on letting the Open Arms sail into Italian waters.
In response, he again banned the ship from Italian waters and from docking at Lampedusa.
Defence Minister Elisabetta Trenta, to whom the Italian navy answers, refused to countersign the order.
Ms Trenta said she acted “listening to my conscience".
“We can’t forget that behind the polemics of these days there are children and youths who suffered violence and every kind of abuse,” she said.
Ms Trenta is from the Five-Star Movement, the senior coalition party, which backs Mr Conte.
Mr Salvini insists that other EU nations should accept more migrants.
In his letter, Mr Conte announced that France, Germany, Romania, Portugal, Spain and Luxembourg said they were willing to take the migrants from Open Arms.
The right-wing League party frequently stokes fears that migrants are to blame for crime and feeds resentment among its voter base against Brussels for its lack of solidarity.
EU rules hold that migrants must apply for asylum in the country where they set foot.
Mr Salvini is openly campaigning to be Italy’s next premier even though no new elections have been set.
He seized on the Open Arms stalemate to blame Italy's migrant plight on the previous centre-left governments led by the Democratic Party, now Parliament's biggest opposition force.
“It’s thanks to this presumed concept of ‘humanity’ in years of the governments that Italy became the refugee camp of Europe,” Mr Salvini said in a post on Facebook.
Manoeuvring this week among Italy’s political leaders has raised the possibility of the Five Stars Movement forging an alliance with the Democrats to thwart Mr Salvini’s quest for the premiership.
And even as the fighting over Open Arms played out, another migrant rescue boat drama loomed.
The Ocean Viking, a Norwegian ship operated by Doctors without Borders and SOS Mediterranee, was awaiting word of where it could take the 356 migrants it has rescued from the Mediterranean.
So far it has appealed to Italy and Malta in vain.
A Unicef regional official urged immediate action to let at least the children on the rescue boats go ashore.
“It is unconscionable that once again politics have been prioritised over saving the lives of children who are stranded on the Mediterranean Sea,” Afshan Khan said, noting that between them the two ships had 130 children.
"Only 11 of the 103 children aboard aboard the Viking Ocean are accompanied by a parent or guardian."