Global climate talks have been rescued from the brink of collapse – but leave a gaping loophole which could allow countries to continue polluting the atmosphere.

Negotiations overran by 31 hours as politicians from 192 countries struggled to reach agreement on the ground rules for a new climate treaty.

A fortnight-long United Nations summit in Peru had aimed to lay the framework for new international laws to slow the pace of global warming.

But the discussions became bad tempered as countries bickered over who should bear responsibility for reducing carbon emissions, whether richer nations should reduce pollution more quickly and how much aid they should pay to help poor countries adapt to global warming.

Scroll down for video

Environmental activists wearing puppet faces representing, from left, Australia's Prime Minister Tony Abbott, Canada's Prime Minister Stephen Harper, Russia's President Vladimir Putin, China's President Xi Jinping, Japan's Prime Minister Shinzo Abe and India's Prime Minister Narendra Modi perform during the Climate Change Conference COP20 in Lima, Peru

Eventually, they agreed to a watered-down deal which postpones the most difficult decisions for 12 months.

The final treaty, which is due to be signed in Paris in 12 months, will be the first international climate agreement since the 1997 Kyoto Protocol.

Energy secretary Ed Davey, who led the 45-strong British delegation in Lima, hailed the compromise agreement as a fundamental step to ensure all nations reduce their climate emissions.

Speaking in the early hours of Sunday morning Lima, he said: ‘We have been up all night, we have sweated to get this deal.

‘We have unlocked the door to the big climate change deal we need in Paris next year.’

Negotiations overran by 31 hours as politicians from 192 countries struggled to reach agreement on the ground rules for a new climate treaty

But he admitted that even if the draft is strengthened over the next 12 months, it may not actually be enforceable.

Britain’s own Climate Change Act forces us to reduce our greenhouse gas emissions 80 per cent by 2050 – driving a boom in wind farms and solar panels as a result.

Negotiators hope to force other nations to adopt similar targets in a legally-binding treaty.

Mr Davey had repeatedly insisted that all countries should provide clear, detailed pledges of the action they will take well in advance of next December’s summit.

US Secretary of State John Kerry delivers a speech during the United Nations summit in Peru

But in the final negotiation the language of the agreement was softened. Whereas before it had insisted that countries ‘shall provide’ details about their emissions, in the final version it said they ‘may include’ the information ‘as appropriate’ to their circumstances.

Critics said this is a major loophole which may allow nations such as Australia – which is critical of the UN process – to wriggle out of the deal.

Mr Davey, however, insisted it was a clear victory to include any request for nations to provide quantifiable information about their emission reduction plans.

‘There are no penalties and sanctions with this stuff, it is about political pressure,’ he said.

‘Any deal we get in Paris next year will not be enforced by fines and sanctions, it will be enforced by political pressure.’

But Alden Meyer, director of policy at the Union of Concerned Scientists lobby group, said the language left room for nations to wriggle out of the deal.

‘It means it is totally up to everyone now whether they provide that information or not,’ he said.

Lord Nicholas Stern, of the London School of Economics, welcomed progress made at the summit – but he said the Paris treaty will fail to stop drastic global warming because it has come too late.

He said: ‘It is already clear that the scale of action to control and reduce annual emissions of greenhouse gases will collectively not be consistent with a pathway that will mean a reasonable chance of avoiding dangerous global warming of more than 2C above pre-industrial level.’

Previous hopes for a climate deal peaked in 2009 at Copenhagen, before the talks fell apart in fierce bickering. Negotiators have been trying to build bridges ever since.

Jonathan Grant, director of climate change at PricewaterhouseCoopers, said: ‘The climate talks almost ground to a halt here in Lima. Progress outside the process failed to translate to progress inside the negotiating hall.

Former U.S. Vice-President Al Gore speaks during a plenary session at the 20th UN Climate Change Conference. The final treaty, which is due to be signed in Paris in 12 months, will be the first international climate agreement since the 1997 Kyoto Protocol

The Lima summit was overshadowed by a controversial publicity stunt by Greenpeace, in which damage was done to the ancient Nazca Lines in southern Peru

‘Brinkmanship is normal in these negotiations, but there's concern that the talks will fall off the cliff in Paris, like they did in Copenhagen.’

The Lima summit was overshadowed by a controversial publicity stunt by Greenpeace, in which damage was done to the ancient Nazca Lines in southern Peru.

Peruvian ministers said the activists had permanently damaged the 1,500-year-old carvings while laying a banner calling for action at the summit.

The conference, attended by 12,500 delegates, green activists and journalists, suffered another setback when it emerged it had produced more carbon emissions than any other summit in the 20-year history of the negotiations.

More than 50,000 tonnes of carbon dioxide were emitted – more than the entire populations of Sierra Leone or Barbados over the same period – partially because plans to run the conference on green energy fell through and organisers had to rely on dirty diesel generators.