ROME — Catholic bishops, tiny Albania and Ireland agreed to take the 140 migrants blocked aboard an Italian coast guard vessel, Italian Premier Giuseppe Conte said Saturday, announcing the end of a 10-day standoff over the asylum-seekers but making clear an angry Italy could avenge a perceived lack of overall European Union solidarity by refusing to approve the bloc’s next multi-year budget.

“Italy must take note that the ‘spirit of solidarity is struggling to translate into concrete acts,” Conte said in a statement. Conte referred to declarations made at an EU summit in late June promising to help Italy and other Mediterranean countries deal with the burden of migrants rescued from human traffickers’ unseaworthy boats.

In his role as head of a nearly three-month-old populist coalition government, Conte said Italy under current conditions “doesn’t consider it possible to express adhesion to a proposed budget that underpins a policy so incoherent on the social level.”

Earlier in the week, some in the government threatened to withhold nearly 20 billion euros ($23 billion) in contributions to the EU if member nations didn’t volunteer to take the last group of rescued migrants reaching Italy. Brussels sharply reminded Italy it was legally obliged to pay.

Interior Minister Matteo Salvini, who leads the anti-migrant League party, refused to let the migrants off the coast guard vessel Diciotti until other EU nations pledged to take the asylum-seekers, most of them young men from Eritrea.

Just before Conte announced the drama’s resolution, Salvini told party supporters at a rally in northern Italy that a Sicily-based prosecutor, Luigi Patronaggio, had put him under investigation for suspected abduction for refusing to let the migrants disembark.

If the prosecutor “wants to interrogate me or even arrest me because I defend the borders and security of my country, I’m proud of it,” Salvini tweeted. Many of his supporters blame migrants for crime.

Earlier in the week, the government’s rights office for detained persons concluded this week that the migrants were being unjustly held by the government.

Salvini took credit for convincing bishops to take many of the migrants. The bishops agreed to “open up their doors, heart and wallet,” he told the rally.

Fifty others of the 190 people rescued at sea on Aug. 16 by the Italian coast guard were previously allowed off the ship, including all the minors and ailing adults.

A few hours before Conte’s announcement, Italian Red Cross ambulances waiting at dockside took away six ill men, suspected of having tuberculosis, pneumonia or other infections, and seven of the 11 women who were still aboard.

Authorities had said the women recounted how they had been raped while in Libya for months, awaiting the opportunity to leave in migrant smugglers’ boats.

Four other women chose not to leave the ship because their husbands were blocked aboard.

The standoff had prompted an impassioned appeal at the height of the standoff Saturday by the U.N. refugee agency’s chief, who asked Italy to let the migrants disembark and urged EU countries to take responsibility for the asylum-seekers.

In Geneva, U.N. High Commissioner for Refugees Filippo Grandi said it’s time to end a “race to the bottom on who can take the least responsibility for people rescued at sea.” He urged European countries “to do the right thing and offer places of asylum for people rescued from the Mediterranean Sea in their time of need.”

Foreign Minister Enzo Moavero Milanesi expressed appreciation for Albania’s “sign of great solidarity and friendship,” his ministry said.

Albania, which isn’t in the European Union, saw thousands of its citizens flee to Italy across the Adriatic Sea aboard dramatically overcrowded rickety ferries and fishing boats in hopes of a better life in the 1990s.

Meanwhile, Sicily-based prosecutors took their investigation of the migrant standoff to Rome. Prosecutor Patronaggio left without speaking to reporters after questioning two Interior Ministry officials at the Italian capital’s prosecutors’ office, the Italian news agency ANSA said.

Prosecutors would have to seek permission from a special panel to question Salvini. As a lawmaker, Salvini also holds immunity from prosecution that could only be lifted by fellow lawmakers.

Italian Red Cross official Stefano Principato in Catania told reporters that Italy’s health minister had ordered an inspection of sanitary conditions for the migrants, who have been sleeping on the ship’s deck and coping with a baking sun and limited toilet facilities.

Doctors have said many of the migrants on the ship have scabies but “more than a health emergency, it would be better to speak of a psychological emergency,” Principato said.

Geir Moulson in Berlin contributed to this report.