(Bloomberg) -- The chaos in Spanish politics couldn’t come at a worse time for the European Union.

On Monday, Prime Minister Pedro Sanchez called a snap general election for July 23. But Spain is slated to take over the rotating presidency of the Council of the EU on July 1, meaning Madrid will be responsible for driving the bloc’s legislative process for the next six months. 

This is a difficult task in the best of times, let alone when going through a campaign and the possible formation of a new government. Now, Spain will be distracted for at least the first month of its EU mandate as candidates focus on winning over voters. And if Sanchez were to lose, that could mean additional time lost to the transition.

“Spain’s ability to oversee the presidency and steer key dossiers will be severely curtailed,” Federico Santi, a senior analyst at Eurasia Group, said in an interview on Monday. “The first month will be lost with a lame duck government in charge, and probably much of August, September and October as the new government takes office and finds its footing.”

The country that holds the EU presidency chairs council meetings where policy is guided on issues that can range from electricity-market reform to the implementation of the bloc’s ambitious green deal. This makes the presidency country responsible for trying to get 27 member states to cooperate on delicate topics.

One of the biggest outstanding issues that will be handled during Spain’s tenure will be the reform of the EU’s fiscal rules, according to Jacob Kirkegaard, a senior fellow at the German Marshall Fund. 

Read More: Spain to Do Utmost to Reach EU Fiscal-Rules Accord This Year

EU member states have been stuck trying to adjust the bloc’s spending rules as outlined in the so-called Stability and Growth Pact, which sets limits on budget deficits and debt. Sweden, which holds the current EU presidency, wasn’t able to make much progress on the file.

A distracted government also means Sanchez may miss the opportunity to put forward issues important to Spain. 

“He is, in my opinion, not only gambling with his own political life, he’s very much also gambling on Spain’s ability to influence the wider agenda in the EU,” Kirkegaard said in an interview.

--With assistance from Alonso Soto.

©2023 Bloomberg L.P.