Prime Minister Pedro Sanchez's Socialist party is currently trailing its closest rival in the polls.
In a little over two weeks, Spain will get to vote in snap elections that will divide their recently started semester leading the presidency of the Council of the EU.
Polls show a possible change in government, with power falling into the hands of the right-wing People's Party (PP) and with the possible entry of Vox, a far-right formation, in a coalition government with PP.
"Whatever the results of the elections are, I trust that the Spanish government and the institutions will be able to deliver an effective presidency and I have full confidence in Spain's deep European spirit," Ursula von der Leyen, president of the European Commission said on Monday during a visit to Madrid.
The summer holidays and the process of government formation, which could take months or even lead to new elections, might draw Spain's attention away from Brussels and water down a six-months presidency that was supposed to reinforce the country's international position in the world.
This term of the Council presidency is the last complete one before the European elections in June 2024 and includes many legislative files that are close to completion.
The team in charge of them, like the current ambassador, has been appointed by the actual government. Changing it before December would likely bring some measure of disorder.
According to Raquel García, an analyst at the Elcano Royal Institute, the core of the presidency will not be affected in the event of a change of government, but there could be some tweaks.
"It is true that the characteristics of one president or another can affect this vocation for leadership and in recent years we have seen that there has been an express desire for this leadership, to speak out in the face of challenges, such as the pandemic or, for example, the Russian invasion of Ukraine, which at first sight may seem to be an issue that is not a priority for Spain, and Spain has wanted to exercise leadership," she told Euronews.
"In this sense, it remains to be seen whether the person who will hold the presidency of the government after the snap elections on 23 July will want to maintain this desire for leadership."
This is not the first time a country holds elections in the middle of its presidency. For instance, Emmanuel Macron was re-elected during France's own semester.