TORONTO – At odds over how to strengthen the global recovery, top world leaders found common ground on foreign policy Saturday, condemning North Korea for the alleged sinking of a South Korean warship and endorsing a five-year exit timetable for Afghanistan

In a joint statement, the leading eight industrial democracies also criticized both Iran and North Korea for continuing their nuclear march and called on both to heed existing United Nations resolutions.

The statement on the March sinking of the South Korean ship was not as strongly worded as the United States and some other countries had hoped. Russia was cited as a holdout against tougher language.

While earlier demonstrations had been nonviolent, black-clad protesters broke off from a larger crowd Saturday, torching police cruisers and smashing windows with baseball bats and hammers. Some demonstrators hurled bottles at police.

“This isn’t our Toronto and my response is anger,” Mayor David Miller told CP24 television.

After spending Friday debating the best response to the lingering global financial crisis, the G-8 leaders — representing the United States, Canada, Britain, France, Germany, Italy, Japan and Russia — focused Saturday on foreign policy, where it appeared easier to find common ground.

The Group of Eight nations concluded the group’s two-day meeting at a lakeside resort about 140 miles north of Toronto with a joint statement.

Leaders then immediately returned to Toronto to continue their talks in the Group of 20, a broader meeting which includes countries with fast-growing economies such as China, India and Brazil.

World leaders found themselves divided on how best to keep the world economy growing after the worst recession since the 1930s.

They split between calls, mainly from the United States, for more government stimulus to keep the world from slipping back into recession, and appeals from European countries and Japan for spending cuts and even tax increases to avoid Greece-like near defaults.

For now, the leaders have generally cooled their rhetoric and agreed that deficits must be tamed in the long term, but different countries may use different tactics in the short term, depending on their levels of indebtedness.

French President Nicolas Sarkozy told reporters that President Obama “clearly talked about the risks of debt and deficit” in the United States.

Treasury Secretary Timothy Geithner said world leaders must work together to make sure the global recovery stays on track. Although the world economy has recovered somewhat, many challenges remain, Geithner told reporters.

“The scars of this crisis are still with us,” he said. “If the world economy is to expand at its potential, if growth is going to be sustainable in the future, then we need to act together to strengthen the recovery and finish the job of repairing the damage of the crisis.”

The back-to-back summits came amid what Canadian Prime Minister Stephen Harper, the host, called an “enormous crisis facing us all, serious threats to the stability, economic prosperity of every country.”

Leaders were also holding one-on-one sessions on the sidelines of the two summits. Obama met separately Saturday with Chinese President Hu Jintao, South Korean President Lee and British Prime Minister David Cameron.

Obama discussed the torpedoing of the South Korean warship with Lee during their meeting. Afterward, Obama said North Korea must be “held to account” and “we stand foursquare behind” Lee. The South Korean appealed for a “strongly worded” resolution out of the U.N. Security Council.

In their closing statement, the G-8 leaders cited an independent report that found that the ship had been sunk by a North Korean torpedo.

The leaders said: “We condemn in this context the attack which led to the sinking of the Cheonan.” But the statement did not explicitly blame North Korea for the attack.

Japanese officials said that Russia was the only G-8 member to resist tougher language condemning North Korea more directly.

An official in the Russian delegation, who spoke on the condition of anonymity, said that Russia still did not consider the results of the investigation to be final and because of this, felt that condemning Pyongyang further could lead to negative consequences.

Obama used the meeting with Lee to announce his administration would resume talks aimed at resolving issues blocking the completion of a free trade agreement with South Korea stalled since 2007.

Obama said his goal would be to clear up remaining differences with Seoul by the time he visits South Korea in November. “It is the right thing to do for our country. It is the right thing to do for Korea,” he said.

White House spokesman Robert Gibbs said South Korean barriers to sales of U.S. autos and beef “are the outstanding issues we most want to see addressed and resolved before sending it up” to Congress.

Gibbs said the administration could submit the agreement later this year “but more likely next year.”

In their final statement, the G-8 countries also called Israel’s current restrictions on the flow of goods to Gaza “not sustainable and must be changed.”

And the leaders endorsed a five-year exit strategy for foreign troops from Afghanistan, a timetable first proposed by Afghan President Hamid Karzai last year. In addition, both Obama and Cameron said the war must show progress this year.

Economic issues were expected to be more prominent at the larger G-20 meeting, which started Saturday evening with a dinner.