The European Parliament and the European Union (EU) member states reached an agreement on Tuesday on a proposed law that establishes mandatory national targets to ensure that the EU will have 20 percent renewable energy in the total energy consumption by 2020.

An informal compromise was reached after the parliament was guaranteed that the 20 percent target for renewables will not be changed regardless of the results of an evaluation of the implementation of the law in 2014.

The deal between parliamentarians and France, which represented the EU member states, also backs the target of at least 10 percent renewable energy in the transport sector by 2020.

The two sides agreed to count renewable energy consumed in a member state but produced by newly constructed joint projects with third countries, a victory for Italy, which has few renewable energy infrastructure.

They also agreed that "second-generation" biofuels produced from waste, residues, or non-food cellulosic and ligno-cellulosic biomass will be double credited toward the 10-percent target. Renewable electricity for trains will be counted only once, but renewable electricity consumed by electric cars will be considered 2.5 times its input.

The compromise still needs to be formally endorsed by ministers of the EU member states and put to a first-reading vote at a plenary session of the European Parliament.

The renewable energy targets are part of a climate change and energy package to be discussed by EU heads of state and government at their summit this Thursday and Friday. The leaders will also debate measures to implement their promises last year that the EU will reduce 20 percent of greenhouse gas emissions and save up to 20 percent of energy consumption by 2020.