U.N. climate change talks inched towards a compromise pact on Sunday that for the first time would aim to force all the biggest polluters to curb greenhouse gas emissions.

After days of emotional debate, the chairwoman of the United Nations climate talks said she understood agreement had been reached and urged delegates to approve four packages, which would have legal force.

It is my assessment that we have reached an agreement, South African Foreign Minister Maite Nkoana-Mashabane said, urging the meeting to adopt it.

I think we all realise they (the packages) are not perfect. But we should not let the perfect become the enemy of the good and the possible.

The talks, which were meant to have ended on Friday, dragged into a second extra day on Sunday and were briefly halted for final haggling over wording by the United States, the European Union, India and China.

We've had very intense discussions, we were not happy with reopening the text, but in the spirit of flexibility and accommodation shown by all, we have shown our flexibility, we have agreed to the words you just mentioned and we agree to adopt it, India's Environment Minister Jayanthi Natarajan said.

Much of the discussion has focused on a European Union plan designed to push major polluters -- from developed and fast-growing emerging economies like China and India -- to accept legally binding cuts in their greenhouse gas emissions.

EU negotiators had accepted legal instrument in one draft as a phrase implying a more binding commitment.

The new text, subject to approval, calls for an outcome with legal force.

But environmentalists and small island states, which fear they literally could sink under the rising sea levels caused by climate change, have said it is nowhere near strong enough.

BLACKMAIL

The discusions took an increasingly bitter turn as they headed into Sunday, a second extra day that made the negotiations the longest in two decades of U.N. climate talks.

Venezuela's climate envoy Claudia Salerno said she had received threats because of her objections to the draft texts.

In the corridor, I have received two threats. One, that if Venezuela does not adopt the text, they will not give us the second commitment period, she said, referring to an extension of the Kyoto Protocol, the only global pact enforcing carbon cuts.

The most pathetic and the most lowest threat... we are not going to have the Green Climate Fund, which is designed to help poor nations tackle global warming and nudge them towards a new global effort to fight climate change.

She did not say who had made the threat and delegates heard her allegation in silence.

Among the sticking points that have held up a deal was the issue of how long to extend the first phase of the Kyoto Protocol.

The EU dropped its demand for a second period of carbon cuts to end in 2020 and accepted it would run from 2013 to 2017.

U.S. VS CHINA AND INDIA

Behind the back and forth over language and technical details, the talks have boiled down to a tussle between the United States, which said all polluters should be held to the same legal standard on emissions cuts, and China and India which want to ensure their fast growing economies are not shackled.

The first phase of the Kyoto Protocol only included developed nations, but since it was adopted in 1997, the division between the developed and developing world has shifted and China has overtaken the United States as the biggest carbon emitter.

Failure to get a deal would be a major setback for host South Africa and raise the prospect the first set of carbon cuts under the Kyoto Protocol could expire at the end of 2012 with no successor treaty in place.

Scientists warn that time is running out to close the gap between current pledges on cutting greenhouse gases and avoiding a catastrophic rise in average global temperatures.

U.N. reports released in the last month warned delays on a global agreement to cut greenhouse gas emissions will make it harder to keep the average temperature rise to within 2 Celsius over the next century.

A warming planet already has intensified droughts and floods, increased crop failures and sea levels could rise to levels that would submerge several small island nations, who are holding out for more ambitious targets in emissions cuts.

(Reporting by Nina Chestney, Barbara Lewis, Agnieszka Flak, Andrew Allan, Michael Szabo and Stian Reklev; editing by Jon Boyle)