The climate change package details how European industries, energy generators, governments, and transport sectors are to effect a "triple 20" deal of reducing greenhouse gas emissions by 20% by 2020 compared with 1990 levels, cutting energy consumption by 20% by the same deadline, and ensuring that 20% of the EU's energy mix comes from renewables.

The deal will cost tens of billions of euros to implement, and has been fought over ferociously for months, with governments and industrial lobbies pleading for special treatment.

With a new US president imminent, and with UN climate talks in Poland aiming to pave the way to a global climate deal a year from now, Europe's leaders argued that yesterday's pact sent a powerful message to Washington, Beijing, Delhi and the others who must commit to reducing emissions, if the earth's rise in temperature is to be kept to no more than a "safe" 2 degrees centigrade.

What happens next?

Four pieces of legislation to be passed next week in the European parliament will do two main things.

One will revise the world's first and biggest carbon trading system, Europe's emissions trading scheme (ETS), so that from 2013 industries start paying to pollute, via the auctioning of permits that permit the emission of tonnes of carbon dioxide and other greenhouse gases into the atmosphere. This system covers Europe's power plants and processing industries .

The second, on "effort-sharing", dictates what the 27 countries of the EU have to do at national level to cut pollution from sectors not covered by carbon trading, such as construction, transport and agriculture. Together, the ETS and the effort-sharing cover all greenhouse gases.

The two other laws concern renewable energy and national targets to reach the 20% across Europe, and the establishment of centrally-funded pilot projects for carbon capture and storage - ie, technology that aims to collect CO2 from power plants and bury it.

What does all this mean for Europe?

Politicians argue that yesterday's deal means Europe is setting an example to the rest of the world, and hope to seal a transatlantic pact with the incoming Obama administration which could result in a fledgling global market in carbon trading.

Environmental and economic standards vary hugely across the EU, from high-achieving Sweden to bottom-of-the-class Romania. The new member states of central Europe have a lot of catching up to do in terms of standards of living but are also saddled with dirty Soviet-era coal power plants. The system seeks to spread the costs and pain accordingly.

Some east European countries are allowed to increase their emissions, while they also benefit from a "solidarity" mechanism, getting 12% of the pollution permits for free, and large discounts on the price of the permits for their heavily-polluting power stations - particularly Poland, by far the biggest of the new states, and which generates more than 90% of its electricity from coal.

In western Europe, the claim is the package will give a big push to clean technology development, encouraging companies to go green, to invest in new plant, and spawn a vast renewables industry.

Who pays and how much?

Despite the "polluter pays" principle of the carbon trading scheme, there are trade-offs and exemptions galore, pushed mainly by Germany's campaign for large concessions to go to its heavy industries. This could see many European companies enjoying what would be in total a multibillion euro bonanza in windfall profits, by pocketing their permits for free and passing on the nominal costs to consumers.

While east European power stations get big discounts on the price of carbon, west European generators pay full whack. Processing industries, however, will get their pollution permits for free if deemed to be exposed to unfair competition from rivals outside the EU. That will mean 96% of firms, according to calculations.

Under the first plan from the European commission, the trading scheme was to generate €55bn (£49bn) in revenue in 2013-20. Given the trade-offs and free permits agreed over the past two days, that pot will be much smaller.

Any other loopholes?

One of the package's most controversial aspects, denounced as neo-colonial by some in the green lobby, concerns "offsetting" whereby states and companies meet their emissions cuts by funding projects in the developing world. Under the trading scheme, companies can count environmental investment in the developing world toward their obligations to cut pollution in Europe. They may offset around of half their burden this way.

Similarly under the national targets, states or companies can also offset their reductions to 70% through projects outside Europe. Environmental activists complain big polluters will need to do little at home; advocates counter that if Denmark builds a wind farm in, say, Cape Verde, that is an excellent thing which would not otherwise happen because this small state could not afford it.

How does the trading scheme work?

It is "cap and trade", with a progressively smaller number of permits auctioned every year. Between 2013 and 2020, the "cap" or emissions ceiling falls by 1.74% a year, to produce an overall greenhouse gas reduction of 21% by 2020 compared with 2005. One permit equals one tonne of CO2; the numbers issued fall each year.

Whether you pay for permits or get them free, say supporters, pollution comes down. If a company emits, say, 1m tonnes of CO2, it either buys or is given 1m permits. If it is then dirtier, it goes to the carbon market to buy more permits. Conversely, firms have an incentive to be cleaner and sell surplus permits to increase earnings. On the market, the current price for CO2 is €15 a tonne, but is expected to hit €40.

Under the staggered reduction scheme, the cap on CO2 emissions in Europe falls from 1,974m tonnes in 2013 to 1,720m in 2020. This is roughly half of CO2 emissions in Europe ,since the other half comes from industries not in the trading scheme.

Why do so many get to pollute for free?

It's the economy. Since the outline package was agreed in March last year, hard times have set in with a vengeance, with governments and industries worried about job losses, the costs of combating climate change, and threats by big corporations to move out of Europe. Italy threatened to veto the deal. Germany's Angela Merkel shifted from being a climate chancellor to a corporate lobbyist. Poland warned electricity prices would soar and threaten the government. But yesterday, everyone claimed they were a winner. Ultimately, deals done in the councils of Europe are like the bargaining in a bazaar.