VALLETTA, Malta — Italy’s new populist government has delivered a jolt to European migration politics, prompting a diplomatic standoff with its refusal to accept a rescue vessel overloaded with migrants.

Even after Spain offered to open its doors on Monday, the incident was not fully resolved, because the Aquarius — with 629 people aboard, including unaccompanied minors, pregnant women and people suffering chemical burns — still faced a grueling multiday journey from near the coast of Malta to the Spanish port of Valencia.

The dispute was among the first consequences of political upheaval in Italy, where anti-migrant leaders recently rose to power with a pledge to crack down on new arrivals from the Middle East and Africa. At a news conference on Monday, Italy’s powerful interior minister, Matteo Salvini, protested the inequity of Italy serving as a primary entry point for refugees and migrants while other members of the European Union balk at helping to resettle them.

“This was a first important signal that Italy cannot go on alone supporting this huge weight,” said Salvini, who threatened to bar additional rescue vessels.

The question of where boats land is a critical one, because European rules require refugees to request asylum in the country where they first arrive. E.U. leaders have butted heads over how to reform those rules and avoid overburdening individual countries. On Monday, Spanish Prime Minister Pedro Sánchez — a Socialist in his second week on the job — pointedly mentioned that it was an “obligation” to give “these 600 people a safe harbor.”

“We comply with international commitments regarding humanitarian emergencies,” Sánchez wrote on Twitter.

But no matter the goodwill Sánchez receives, analysts and migration experts said Spanish ports don’t represent a sustainable alternative for vessels rescuing migrants stranded in the Mediterranean, given the distance those boats would need to travel, as well as existing pressures in Spain.

Italy has been the de facto destination for rescue boats since the migrant crisis began five years ago. Asylum seekers leaving Africa and the Middle East typically set off in rubber vessels that have little chance of making it across the Mediterranean. Many don’t get far beyond Libya’s waters before they find themselves in distress.

Initially, the Italian navy took the lead in the Mediterranean with a massive rescue effort. Even after that campaign ended in 2014, the nation has coordinated rescue missions in the central Mediterranean.

But the political mood in Italy has changed, with resentment growing among voters toward both migrants and the E.U.

Italy’s previous left-center government had already been moving to cut off the flow of migrants to its shores by drawing up rules for humanitarian rescue vessels and working to build up Libya’s coast guard, which routinely intercepts migrant boats and takes would-be asylum seekers back to Libya. This year, migration to Italy is down by more than 75 percent, according to data from the U.N. migration agency. Since the start of the year, nearly 14,000 migrants have arrived in Italy; an additional 500 have died attempting the journey.

But the decision to close ports was significant because it showed Italy’s willingness to put up a stop sign closer to its border.

“To deny entry to a port when the facilities are there, it feels like a bigger statement,” said Elizabeth Collett, the director of the Migration Policy Institute Europe. “It’s the confluence — a new government, [Salvini] has to make a stand, he has to show he stands for the things he campaigned on.”

Salvini, the leader of the right wing League party, is for now the most prominent voice in Italy’s new government. On Sunday, when Italy told the Aquarius not to proceed to ports in Sicily, Salvini first pushed Malta to accept the vessel, saying that the tiny E.U. island country — in the middle of the Central Mediterranean migration corridor — routinely closes its doors. Malta resisted, and its prime minister, Joseph Muscat, accused Italy of breaking “international rules” and blamed it for causing a “standoff.”

The Aquarius was filled well above its capacity of 550 people after a busy weekend involving six rescue operations, including transfers from the Italian coast guard. Doctors Without Borders, which has staff on board, said 15 of the migrants had significant chemical burns — common among those who sit on the floor of smugglers’ boats, where gasoline mixes with seawater.

Nongovernmental organizations, which now play a large role in rescuing migrants, say they are concerned that Italy’s stand will make their work harder.

“If we can’t rely on getting relief in any of those ports, I personally say we can’t go back out” for additional missions, said Klaus Stadler, the captain of a rescue boat operated by the German NGO Sea-Eye. “And then more people will die.”

At a news conference Monday afternoon, Salvini was asked whether Spain’s humanitarian gesture was a “slap in the face” to Italy.

“I wish I had tens of slaps like these,” Salvini said. “If the French, Greek, Cypriot, Maltese and Finnish governments will want to help us tackle the problem, I am willing to be slapped from morning until dusk.”

Stefano Pitrelli contributed to this report.