UN climate negotiations opening in Lima on Monday have the best chance in a generation of striking a deal on global warming, diplomats say.

After a 20-year standoff, diplomats and longtime observers of the talks say there is rising optimism that negotiators will be able to secure a deal that will commit all countries to take action against climate change.

The two weeks of talks in Peru are intended to deliver a draft text to be adopted in Paris next year that will commit countries to reduce their greenhouse gas emissions without compromising the economic development of poor countries.

Diplomats and observers of the UN climate negotiations said recent actions by the US and China had injected much-needed momentum.

“I have never felt as optimistic as I have now,” said Tony de Brum, the foreign minister of the Marshall Islands, which are sinking as sea levels rise in the Pacific. “There is an upbeat feeling on the part of everyone that first of all there is an opportunity here and that secondly, we cannot miss it.”

Beyond Lima, there is growing evidence of the dangers of climate change, and of countries’ failure to act.

The UN environment programme warned earlier this month that industrialised countries were falling short of the emissions reductions needed to prevent warming of 2C above pre-industrial levels, the goal set by world leaders. Carbon dioxide emissions are expected to reach a record high of 40bn tonnes in 2014. Meanwhile, 2014 is shaping up to be the hottest on record.

Observers, however, said there was fresh optimism surrounding the Lima talks after the US and China declared on 12 November that they would work together to cut carbon pollution.

Under the deal, China committed to cap its output of carbon pollution by 2030 or earlier and to increase its use of zero emission energy to 20% by 2030. The US agreed to reduce its emissions by between 26% and 28% from their 2005 levels by 2025.

The EU, the next biggest polluter after the US and China, earlier pledged to cut emissions by 40% from their 1990 levels by 2030.

Christiana Figueres, the UN’s top climate official, said the commitments, which have been made well in advance of a March 2015 deadline, had given the talks a boost.

“It is hugely encouraging that well ahead of next year’s first-quarter deadline, countries have already been outlining what they intend to contribute to the Paris agreement. This is also a clear sign that countries are determined to find common ground,” she said in a statement.

Todd Stern, the US state department’s climate change envoy, said the US-China deal could push other big polluters such as India, Japan, Brazil and Russia to come forward with their own post-2020 targets. That in turn boosted prospects for a good outcome in Paris.

“I think it will spur countries to come forward with their own targets,” he said. “Generally if you are holding stock in the Paris negotiations your stock went up.”

Andrew Steer, the president of the World Resources Institute, an environmental thinktank in Washington, said the US-China deal had changed the atmosphere surrounding the talks.

“There is in the air a sense of momentum,” he said. “You’ve already got commitments of about half of all the greenhouse gas emissions that need to be reduced.”

The deal likely to be done in Paris will likely be a hotchpotch of targets such as those announced by the three top carbon polluters, according to an analysis by Bloomberg New Energy Finance.

The test for Lima will be the degree to which negotiators can corral those separate action plans from up to 190 countries into a single agreement.

If the talks are to succeed, they will have to come up with a draft text that outlines the structure of that agreement - how to ensure countries commit to deep enough cuts to limit warming to the 2C goal, and how to verify their actions.

The US is pushing for a deal that would avoid setting emissions reduction targets that are legally binding under international law, because that would set up a clash with congress.

Many developing countries, however, insist on legally binding targets. They also argue that only the industrialised countries should have to cut emissions.

The negotiators will also try to ramp up pledges for the Green Climate Fund, which was set up to help developing countries deal with climate change. So far, the fund has raised $9.7bn (£6.2bn) from 22 countries, just short of its initial $10bn target.

The fund is woefully behind its goal of mobilising $100bn a year in public and private finance by 2020.