Spanish Primer Minister Pedro Sánchez and British Prime Minister Theresa May | Ben Stansall/AFP via Getty Images Spanish prime minister calls for second Brexit vote Pedro Sánchez says the UK has taken a path of ‘self-absorption.’

MADRID — Spanish Prime Minister Pedro Sánchez called on his U.K. counterpart to call a second referendum on Brexit, becoming the most prominent EU leader to push for British voters to have an opportunity to think again.

“If I was Theresa May, I would call a second referendum — no doubt," Sánchez told POLITICO in an interview at La Moncloa, the government headquarters in Madrid.

Although EU leaders frequently express their regret that Brexit is happening, they have for the most part avoided backing a second vote — a very politically sensitive question in the U.K. — for fear of appearing to interfere in the U.K.'s Brexit debate. Thus far, only Maltese Prime Minister Joseph Muscat and Andrej Babiš, his counterpart in the Czech Republic, have called for a second vote.

With most polls nudging only slightly in favor of Remain despite grinding negotiations with the EU, the question of a second poll has until recently looked like something of a moot point — particularly since May herself has categorically ruled it out. But a mass protest by an estimated 700,000 people in London last month calling for a second vote, plus the resignation Friday of mid-ranking minister Jo Johnson, have given new momentum to the cause.

Johnson, who is the brother of former Foreign Secretary Boris, said that May is offering the country a choice between "vassalage and chaos." He added that "the democratic thing to do is to give the public the final say."

The Spanish leader described the U.K. as a “marvelous country” which has exerted a “positive influence” on European politics.

In the interview with POLITICO, Sánchez warned that no good would come from the U.K.’s departure — saying it would be painful for Britain and the EU.

“It’s true that we’re now on the verge of signing a transition deal,” he said, but “I’d like to see the British government calling a second referendum. I don’t mean now, but in the future, so that it can come back to the EU. In another way, but back into the EU.”

British and EU negotiators worked through the weekend to complete a deal on terms of the U.K.’s departure. The treaty must be ratified by the U.K. and European parliaments and some EU27 officials have speculated that a second referendum would only be possible if May fails to win the votes needed to push the withdrawal treaty through parliament.

A second referendum might first therefore require the collapse of her government. But most people advocating for it in the U.K. envisage it happening before Britain's formal departure, because they think it would be hard to reenter the EU on the favorable terms that the country currently enjoys.

EU27 officials have been extremely reluctant to intercede in the U.K.’s internal political debate on Brexit, viewing it as out of their control. Brussels also does not want any blame should May lose her grip on power, though that may be unavoidable.

Sánchez, who defines himself as a “militant pro-European,” became prime minister in June after orchestrating a parliamentary motion of no confidence in his conservative predecessor, Mariano Rajoy. Sánchez, a Socialist, now leads a fragile minority government.

The Spanish leader described the U.K. as a “marvelous country” which has exerted a “positive influence” on European politics, but has now taken a path of “self-absorption which isn’t going to be good either for the U.K. or for Europe.”

“I believe it’s a great loss for both and I hope it can be reconsidered in the future,” he said.

Spain will become the fourth-biggest country in the EU after Brexit. But the close relationship with the U.K. — the leading recipient of Spanish foreign investment and the source of nearly 19 million tourists to Spain last year — means Madrid faces the risk of a sizeable, negative economic impact from Britain’s departure.

This would particularly be true under a no-deal Brexit scenario, which could also deeply disrupt the lives of the about 240,000 British citizens living in Spain (according to the National Institute of Statistics). The government estimates the real number of Brits living in Spain is even higher.

Sánchez said it isn't "democratic" to decide to leave the EU with 51 percent support.

Following pledges by May to uphold the rights of EU citizens living in the U.K. even in the case of a no-deal Brexit, Sánchez committed to doing the same for British citizens in Spain.

“I appreciate and thank very much Prime Minister May’s commitment to safeguarding those rights,” he said. “We will do the same with the 300,000 Britons who’re in Spain.”

This promise was also made by Spain’s previous conservative administration.

In any case, Sánchez said Madrid wants negotiators to achieve a divorce deal with an approach “as pragmatic as possible,” and which also “prioritizes the general interest of the ensemble of the EU.”

“We’re now closer to an agreement than three weeks ago and let’s hope therefore that we can reach an agreement in December,” he said.

Sánchez argued that the negative impact of Brexit can already be seen in the “hundreds of thousands of demonstrators” advocating for Remain in British streets or in the Scottish plans for a second vote on secession from the United Kingdom.

Spanish politicians across the spectrum have long been unsettled about the possibility that Scottish secession — and much more an eventual fast-track entrance of an independent Scotland into the EU — could encourage Spain’s own secessionist movement in Catalonia.

So even as Sánchez urged a second referendum on Brexit, he voiced his opposition to the first Brexit vote — he said it isn't "democratic" to decide to leave the EU with 51 percent support — and cautioned against public votes in potential breakaway regions.

“All these kind of referendums do is fragment … and polarize societies,” he said.