Developed and developing nations have agreed that global temperatures should not rise more than 2C above 1900 levels, a G8 summit declaration says. That is the level above which, the UN says, the Earths climate system would become dangerously unstable. US President Barack Obama said the countries had made important strides in dealing with climate change. But the G8 failed to persuade developing countries to accept targets of cutting emissions by 50% by 2050. On Wednesday, the G8 agreed its own members would work towards 80% cuts by the same date. UN Secretary General Ban Ki-moon said the G8 had not done enough and should also set 2020 targets. He said that while the G8s Wednesday agreement was welcome, its leaders also needed to establish a strong and ambitious mid-term target for emissions cuts. The second day of the summit, in the Italian city of LAquila, opened its discussions to take in the so-called G5 nations - Brazil, China, India, Mexico and South Africa. Egypt is a special invitee. In other developments: * The worlds biggest economies have agreed to work to reach a global trade deal by 2010 * Leaders of major developed and developing nations have agreed not to resort to competitive currency devaluations The latest declaration was issued by the Major Economies Forum, of 16 developed and developing nations - the G8, G5, Australia, South Korea and Indonesia - plus the European Union. We recognise the scientific view that the increase in global average temperature above pre-industrial levels ought not to exceed 2C, it said. It added that the economies would work towards a global goal for substantially reducing emissions by 2050 between now and December, when the UN holds talks in Copenhagen on a successor to the Kyoto treaty. President Obama, who chaired the meeting, said the countries had had a candid and open discussion about the growing threat of climate change and what must be done both individually and collectively to address it. I believe weve made some important strides forward as we move towards Copenhagen, he said. I dont think I have to emphasise that climate change is one of the defining challenges of our time. The science is clear and conclusive and the impacts can no longer be ignored. BBC environment analyst Roger Harrabin says the declaration is a significant step, with all big countries rich and poor agreeing there is a scientific limit on the amount we should warm the climate. But there is still a huge way to go, he says, as developing nations like India will not sign up to any 2050 targets unless rich nations show more determination and offer more cash. The G8 summit began in LAquila on Wednesday, with the first day largely taken up with discussion of the fragile state of the global economy. The leaders also issued a statement reaffirming that they were deeply concerned by Irans nuclear programme and condemning North Koreas recent nuclear test and missile launches. African leaders will join the summit on Friday to push for a new initiative to fund farming in the developing world and tackle global hunger.