The agreement, hailed as a "landmark" deal and a breakthrough by politicians and the green lobby alike, came before a crucial EU summit opening in Brussels tomorrow at which 27 prime ministers and presidents are supposed to finalise an ambitious package to cut greenhouse gas emissions by 20% by 2020.
The agreement reached yesterday paves the way for a law obliging all EU countries to meet national targets for renewable energy. Two points had threatened to derail the legislation: the insistence that biofuels comprise 10% of transport fuel by 2020, and an attempt by Italy to loosen the law by ordering a review of progress on renewables in 2014. The review date was retained, but the compulsory target and national quotas also survived.
Biofuels have become an incendiary issue over the past year because of soaring food costs and shortages, partly blamed on the diversion of land to grow fuel rather than food. Expert opinion has turned on the value of biofuels in combating climate change. The 10% of transport fuel target was retained, but the equation was changed to include electric cars and trains and the European commission is to report within two years on the impact on land use and sustainability of biofuels.
Experts argue that using crop-based products as a petrol or diesel substitute is misplaced, as greater energy savings can be made by using them for heating.
Greenpeace, usually a fierce critic of the EU climate change policies, described the agreement as a "landmark".
Claude Turmes, the Luxembourg Green MEP who led the negotiations for the European parliament, said he had "mixed feelings" about the biofuels factor.
"Despite mounting scientific evidence on the dangers of biofuels, we were unable to completely revise this wrong-headed target ... Renewable energy will be put at the very heart of EU energy policies."
The European Wind Energy Association, a lobby group, said yesterday's deal put Europe in the lead of "the energy revolution the world needs". It calculated that, if the law was properly implemented, more than a third of Europe's electricity would come from renewable sources by 2020.
The summit in Brussels will turn on the broader deal to cut emissions by 20% by 2020. Britain came under pressure yesterday to reinvest in green technology the millions of pounds likely to be raised from auctioning carbon emission permits.
The environmental consultancy WSP predicts the UK government could possibly raise as much as £1bn from 85m permits in 2012 and £2.5bn in 2013. Next year alone the British government plans to auction 25m permits, raising nearly £350m.
A cross-party group of Lords says the funds raised through the ETS should be ploughed back into "climate change-related measures" to "maintain the credibility of the scheme".
The Lords also said that moves by some European countries to "postpone" broader use of permit auctioning to spare industry the additional cost should be resisted.
• This article was amended on Wednesday December 10 2008. We referred to an EU summit taking place on Thursday December 11 as being held in Poznan, Poland; in fact, this will summit take place in Brussels. This has been corrected (The Guardian).