Spain, which holds the EU rotating presidency, wants its European peers to reach an agreement in principle on the reform of the common electricity market in the coming weeks, a source at Spain's energy ministry said on July 7.

EU countries have so far failed to agree terms on how to reform the market to speed up deployment of renewable energy and shield consumers from price surges. One of the issues they have clashed over is state aid for power plants, and this remains the main sticking point, according to the source.

Madrid, which holds the EU presidency until the end of the year, has made clinching a deal one of its key priorities.

Spain's will be the last full presidency before European Parliament elections next June, adding more urgency to the need to complete the reform.

Spanish diplomats are working daily to hammer out an agreement before the summer break, the source said, with a goal of starting negotiations with the European Parliament and the European Commission after the break and sealing a deal by the end of the year.

Next week, Spain is hosting an informal meeting of environment and energy ministers in Valladolid, northwest of the country, although the reform is not on its formal agenda.