COPENHAGEN - World leaders took the stage at the largest ever climate talks on Wednesday as ministers scrambled to rescue troubled negotiations on a pact to avoid dangerous global warming.

Police using truncheons and pepper spray detained 230 people outside the conference center in Copenhagen as hundreds of protesters demanding tough action on climate change tried to push through barricades, a Reuters reporter said.

Inside, frustration was growing over the lack of progress after nearly two weeks of talks to try to agree on steps by all nations to try to expand or replace the existing Kyoto Protocol.

India's environment minister said the Kyoto pact was in intensive care two days before heads of state from around the globe are expected to agree a deal to slow rising temperatures set to cause heat waves, floods, desertification and rising seas. He blamed rich nations for trying to sideline the pact.

A formal summit of more than 120 world leaders will be held on Thursday and Friday to try to break the deadlock on who should cut greenhouse gas emissions, by how much and who should pay.

But some delegates in the main plenary meeting on Wednesday said an agreement was far away.

Tuvalu are extremely disappointed by the lack of progress, on extending the Kyoto Protocol, said Ian Fry. Tuvalu is among the most vulnerable low-lying island states at risk of disappearing as seas rise.

It's time to save this process, he said.

Leaders including Venezuelan President Hugo Chavez, Zimbabwe's President Robert Mugabe and British Prime Minister Gordon Brown were set to give speeches at the December 7-18 climate meeting, until now dominated by environment ministers.

At stake is a deal to transform global economies by putting greater curbs on planet-warming greenhouse gas emissions, mainly from burning fossil fuels, from 2013 after Kyoto's first phase ends.

UPHILL STRUGGLE

But deep mistrust has mired the two-year talks launched in Bali, Indonesia, in 2007, that set a deadline for Copenhagen to yield a legally binding climate deal from 2013.

Instead, hosts Denmark expect a politically binding agreement on the way forward will be signed by Friday and some delegates and greens feared leaders will be given weak negotiating text.

Developing countries are demanding rich nations promise much deeper emissions cuts and substantial money to help them fight climate change and green their economies.

It's a pretty uphill struggle here, British Prime Minister Gordon Brown told BBC television. There is a goodwill, there are huge barriers but they are not insurmountable.

U.S. President Barack Obama expressed confidence a climate deal can be clinched, a White House spokesman said.

Others were less confident.

The current position is nearly hopeless. We can only hope that today and tomorrow the heads of government are going to deliver, said Habibur Rahman Shiraz with the delegation from Bangladesh, one of the countries most vulnerable to the impacts of a changing climate.

China, the United States, Russia and India are the top emitters and have all set goals for curbing emissions in recent months. But rich and poor nations are demanding more than the other side is willing to give.

HURDLES

A major hurdle is that the United States has not yet passed legislation capping its emissions -- unlike all its main industrial allies.

All nations needed to set tougher targets, U.N. Secretary General Ban Ki-moon said.

We are just three days away from final deal in Copenhagen. I am reasonably optimistic, Ban told Reuters Insider television.

But he said finance was key and called on rich nations to spell out a 2020 target for climate aid for the poor. At a minimum, nations should also agree on halving global greenhouse gas emissions by 2050.

Indian Environment Minister Jairam Ramesh said developing countries want rich nations to be held to their Kyoto obligations, and sign up to a second round of tougher commitments from 2013, as the current pact provides for.

But he said many developed countries were vehemently opposing the protocol and some of them wanted a single new accord obliging all nations to fight global warming.

China told the plenary it was resolutely opposed to any attempts or efforts to water down or scrap Kyoto.

Conservation group WWF said little of substance had been decided into draft negotiating texts to be passed to ministers and leaders.

In many ways the final sessions have produced more disagreement rather than less on key issues as negotiators dig in, said Kim Carstensen, head of WWF's global climate initiative.

(With extra reporting by Anna Ringstrom, Gerard Wynn, Peter Griffiths, Karin Jensen and Emma Graham-Harrison; Writing by David Fogarty; Editing by )