'Marvelous act'
In an effort to get countries to scale up their commitments, the agreement will have five-yearly reviews of their pledges starting from 2023.
Nations most vulnerable to climate change lobbied hard for the wording to limit warming to 1.5C.
Big polluters, such as China, India and oil-producing giant Saudi Arabia, preferred a ceiling of 2C, which would have enabled them to burn fossil fuels for longer.
China's chief negotiator Xie Zhenhua said the pact was not perfect.
"However, this does not prevent us from marching historical steps forward," he said.
"This indeed is a marvelous act that belongs to our generation and all of us."
Tuvalu, a Pacific island nation of about 10,000 people at risk of being submerged by rising oceans, celebrated.
"We have saved Tuvalu, and in doing so we have saved the world," Tuvalu negotiator Ian Fry said.
Hillary Clinton, the Democratic Party's front runner for the U.S. presidential race, noted, however, that "the next decade of action is cr
ucial." "If we do not press forward with driving clean energy growth and cutting carbon pollution across the economy, we will not be able to avoid catastrophic consequences."