Ministers fought to save U.N. climate talks from collapse on Saturday, searching to narrow differences between rich and poor nations over how quickly to fight global warming.

Ministerial negotiations in the South African port city of Durban dragged into Saturday afternoon even as many delegates from poor states headed home, although the remaining delegates appeared cautiously optimistic by early evening.

I think we are making progress, but we will see. We are close, said U.S. climate envoy Todd Stern.

Two weeks of talks between almost 200 states in the South African port of Durban stalled late on Friday, when island nations and developing states under threat from the rising sea-levels and extreme weather demanded a more ambitious text.

Negotiators have been arguing over the wording of a range of highly technical sections that make up the package of agreements, which cover a range of topics from greenhouse gas emissions targets to forestry accounting rules, green tech transfers and cash to help poor countries adapt to climate change.

But behind the haggling over technical details, the talks have boiled down to a tussle between the United States, which wants all polluters to 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.

Brazil's climate envoy Luiz Alberto Figueiredo Machado said he nevertheless believed a deal would be done, avoiding the postponement of decisions until next year.

That would have been a major setback for host South Africa and raise the prospect that the Kyoto Protocol, the only global pact that enforces carbon cuts, could expire at the end of next year with no successor treaty in place.

We are agreeing. a protocol or another legal instrument. Everything is there, he said. Developing and EU states objected to the phrase legal framework in a previous draft, saying it was too vague, insisting instrument implied a more binding commitment.

That commitment would start by 2020, so as not to have a gap, he said.

That meets a key demand of the European Union, which wants to set a date of 2015 at the latest for a new climate deal that would impose binding cuts on the world's biggest emitters of heat-trapping gases. Any deal could then come into force up to five years later.

Failure to reach a concrete accord in Durban would cast doubt over measures tentatively agreed by delegates. They include measures to protect forests and another to bring to life the Green Climate Fund, designed to help poor nations tackle global warming.

U.N. reports released in the last month show time is running out to restrict global warming to safe limits, generally accepted as within a 2 degree Celsius rise in average global temperatures. A warming planet has already intensified droughts and floods, increased crop failures and sea levels could rise to levels that would submerge several small island nations.

(Reporting by Nina Chestney, Jon Herskovitz, Andrew Allan and Michael Szabo and Stian Reklev; editing by Jon Boyle)