"Here is the tightrope we must walk," said Canadian Prime Minister Stephen Harper, who pushed the deficit-cutting goal.
"To sustain the recovery, it is imperative we follow through on existing stimulus plans. At the same time, advanced countries must send a clear message that as our stimulus plans expire, we will focus on getting our fiscal houses in order."
Obama noted the goal of cutting deficits, but he tempered his support for that goal with a caution that growth and job creation must come first.
"In the United States, I've set a goal of cutting our deficit in half by 2013. A number of our European partners are making difficult decisions," he said. "But we must recognize that our fiscal health tomorrow will rest in no small measure on our ability to create jobs and growth today. . . . We can't all rush to the exits at the same time."
The group's final statement said stimulus spending, along with financial regulations, helped to bring the world back from the deepest recession since the 1930s.
"Our efforts to date have borne good results," said the group, which represents 85 percent of the world's economy. "Unprecedented and globally coordinated fiscal and monetary stimulus is playing a major role in helping to restore private demand and lending."
It added, though, that the world has not yet fully recovered, and still needs help.
"Serious challenges remain," the leaders said. "While growth is returning, the recovery is uneven and fragile, unemployment in many countries remains at unacceptable levels, and the social impact of the crisis is still widely felt."
At the same time, they signaled that the recent debt crisis in Greece was a reminder of the dangers of excessive deficits and debt. "Recent events highlight the importance of sustainable public finances and the need for our countries to put in place credible, properly phased, and growth-friendly plans to deliver fiscal sustainability, differentiated for and tailored to national circumstances," the group said.
Specifically, the group recommended cutting deficits in half by 2013 as measured as a share of the economy, and then stabilizing deficits at the lower levels by 2016.
European deficit hawks applauded the pact.
"Honestly, this is more than I expected, because it is quite specific," said German Chancellor Angela Merkel. "It's a success that industrialized countries as a group accepted this."
Merkel argued that without prompt actions to rein in spending, investors would drive up governments' borrowing costs, as they did in Greece and Portugal.
Germany, along with France and the United Kingdom, has announced austerity plans in recent days aimed at curbing deficits by cutting spending and raising taxes.
The Obama administration insisted that the deficit target is not a problem for the United States, saying his government already has proposed deep cuts in the deficit.
Obama's proposed budget would cut the deficit from roughly $1.5 trillion this year to $724 billion in 2014.
As a share of the total economy, the deficit would drop from about 10.3 percent to 4 percent by 2014.
That is enough to meet the G-20 goal.
But the U.S. deficit would start rising again immediately after that, according to the nonpartisan Congressional Budget Office. That has driven Obama to ask a bipartisan commission to recommend ways to bring the deficit down more.
The G-20 includes the world's major industrial countries - the United States, Japan, Germany, France, Britain, Canada, Italy, and Russia - plus major developing nations such as China, India, and Brazil.
In a news conference after the G-20 meeting, Obama referred only indirectly to the disagreement with Europe, saying: "We must recognize that our fiscal health tomorrow will rest in no small measure on our ability to create jobs today."
Obama, accompanied to the meeting by his Treasury secretary, Timothy F. Geithner, argued that additional spending might be needed to reduce high unemployment and jump-start business investment, and that hasty withdrawal of spending might cause a double-dip recession.
But he added: "As we've proven repeatedly over the past 18 months, our nations can and have come together, through the G-20, to build on the foundation of our shared interests. Indeed, that's the purpose of these meetings."
He called the meeting a success, citing discussions on regulating banks and combating malnutrition and corruption.
The mood at the meeting was far less anxious than in November 2008, when the G-20 leaders convened for the first time, in Washington, to battle a raging financial crisis. But it was hardly cheery.
"Deficit reduction that does not compromise growth is the holy grail that the G-20 is after, but the quest is going to be a difficult one in countries with battered financial systems and weak growth prospects," said Eswar S. Prasad, a professor of trade policy at Cornell University and an authority on China's economy.
More Than 600 Protesters Held
Police raided a university building and rounded up more protesters Sunday in an effort to quell further violence near the G-20 global economic summit site a day after black-clad youths rampaged through the city, smashing windows and torching police cars.
Police said they arrested more than 600 demonstrators, many of whom were hauled away in plastic handcuffs and taken to a temporary holding center constructed for the summit.
Law enforcement officials adopted a more aggressive strategy Sunday by going into the crowd to make arrests, compared with the previous day when they stood back as protesters torched four police cars and broke store windows.
No serious injuries were reported among police, protesters, or bystanders, Toronto Police Constable Tony Vella said Sunday.
This article includes information from the New York Times News Service.