President Obama had earlier warned that time was running out
Key states have reached what they call a "meaningful agreement" at the Copenhagen climate summit.
A US government official said the deal was a "historic step forward" but was not enough to prevent dangerous climate change in the future.
Analysts welcomed the fact that a deal had been done, but said its achievements were modest.
US President Barack Obama said the deal would be a foundation for global action but there was "much further to go".
He said the US, China, Brazil, India and South Africa had "agreed to set a mitigation target to limit warming to no more than 2C and, importantly, to take action to meet this objective".
He added: "We are confident that we are moving in the direction of a significant accord."
BBC environment correspondent Richard Black said it was not yet clear how other countries would view the agreement.
Some delegations had not seen the latest document, our correspondent said.
The two-week summit had been deadlocked as world leaders had struggled to hammer out a deal.
Responding to Friday's developments, Greenpeace UK executive director John Sauven expressed disappointment.
"It seems there are too few politicians in this world capable of looking beyond the horizon of their own narrow self-interest, let alone caring much for the millions of people who are facing down the threat of climate change," he said.
"It is now evident that beating global warming will require a radically different model of politics than the one on display here in Copenhagen."