Dozens of world leaders have signed the Paris Agreement on climate change as the landmark deal takes a key step towards coming into force years ahead of schedule.

Some brought a personal touch to the historic occasion. US Secretary of State John Kerry held his young granddaughter, and gave her a kiss, as he signed.

The signing ceremony - at which more than 170 countries were taking part - is expected to set a record for international diplomacy: Never have so many countries signed an agreement on the first available day. States that do not sign on Friday have a year to do so.

"The era of consumption without consequences is over," UN secretary-general Ban Ki-moon told the New York gathering.

French President Francois Hollande was the first to sign the agreement which will enter into force once 55 countries representing at least 55% of global emissions have formally joined it.

The United States and China, which together account for nearly 40% of global emissions, have said they intend to join this year.

US President Barack Obama welcomed the signing saying he hopes it will allow "all of our children to inherit a cleaner, healthier, and safer planet".

As the world's second-largest source of carbon emissions, the United States has a responsibility to act, he said.

Mr Kerry said signing the agreement was a moment for world leaders to recommit to actually win the "war" against carbon emissions that are making the planet hotter every year.

"The urgency of this challenge is only becoming more pronounced," he said, "and this is why our gathering today is, in fact, historic."

He said the power of last December's climate agreement "is the message that it sends to the marketplace".

It is going "to unleash the private sector" to define the new energy of the future and set the global economy on a new path to development that preserves the environment, he said.

Many expect the climate agreement to come into force long before the original deadline of 2020. Some say it could happen this year.

After signing, countries must formally approve the agreement through their domestic procedures. The United Nations says 15 countries, several of them small island states under threat from rising seas, are set to do that on Friday by depositing their instruments of ratification.

China's climate envoy Xie Zhenhua said China would "finalise domestic procedures" to ratify the Paris Agreement before it hosts the G-20 summit in September.

Maros Sefcovic, the energy chief for another top emitter, the 28-nation European Union, said the EU wants to be in the "first wave" of ratifying countries.

Countries that had not yet indicated they would sign the agreement on Friday include some of the world's largest oil producers, including Saudi Arabia, Iraq, Nigeria and Kazakhstan, the World Resources Institute said.

Before leaders started signing, Hollywood star Leonardo DiCaprio urged them to leave fossil fuels "in the ground where they belong" telling them they are the "last best hope" for saving the planet from the disastrous effects of global warming.

The actor, who is a UN Messenger of Peace with a special focus on climate change, added: "We can congratulate each other today, but it will mean absolutely nothing" if you return to your countries and don't take action to implement the deal."

The Paris Agreement, the world's response to hotter temperatures, rising seas and other impacts of climate change, was reached in December as a major breakthrough in UN climate negotiations, which for years were slowed by disputes between rich and poor countries over who should do what.

Under the agreement, countries set their own targets for reducing emissions of carbon dioxide and other greenhouse gases. The targets are not legally binding, but countries must update them every five years.

Already, states face pressure to do more. Scientific analyses show the initial set of targets that countries pledged before Paris do not match the agreement's long-term goal to keep global warming below 2C, compared with pre-industrial times. Global average temperatures have already climbed by almost 1C. Last year was the hottest on record.

The latest analysis by the Climate Interactive research group shows the Paris pledges put the world on track for 3.5C of warming. A separate analysis by Climate Action Tracker, a European group, projected warming of 2.7C.

Either way, scientists say the consequences could be catastrophic in some places, wiping out crops, flooding coastal areas and melting Arctic sea ice.