President Barack Obama berates North Korea over Cheonan
US President Barack Obama has said North Korea must be "held to account" for the sinking of a South Korean warship.
He said he stood with South Korean leader Lee Myung-Bak, and condemned Pyongyang's "irresponsible behaviour".
His comments came shortly after the G8 group of industrialised nations meeting in Toronto condemned the sinking of the corvette Cheonan earlier this year.
North Korea has denied attacking the ship.
An international investigation concluded that it was sunk by a North Korean torpedo.
After meeting the South Korean leader on the sidelines of the summit, Mr Obama said: "There has to be consequences for such irresponsible behaviour."
The G8 leaders also criticised North Korea - and Iran - over their nuclear activities, and they described the Israeli blockade of the Gaza Strip as "not sustainable".
And they admitted that the global financial crisis had compromised efforts to meet UN targets for reducing world poverty.
Canada is also hosting a summit of the wider G20 group of industrial and developing powers, which will will discuss the global economy and financial reform.
Thousands of demonstrators marched on the G20 summit on Saturday in what is being reported to have been a largely peacefully rally that saw outbreaks of violence on its edges. These saw groups of young men scuffle with riot police and set fire to at least two patrol cars.
In their final summit statement, the G8 - the US, Canada, Germany, UK, France, Italy, Russia and Japan - said: "We deplore the attack on 26 March that caused the sinking of the Republic of Korea's naval vessel, the Cheonan, resulting in tragic loss of 46 lives."
Noting that an international investigation had found that, despite its denials, Pyongyang was to blame for the attack that sank the warship, the statement adds: "We condemn, in this context, the attack which led to the sinking of the Cheonan.
"We demand that the Democratic People's Republic of Korea refrain from committing any attacks or threatening hostilities against the Republic of Korea."
Reuters news agency says the statement was not as strongly worded as some nations, including the United States, had hoped. It says Russia was said to have held out against stronger language.
The statement also expresses the G8 leaders' "gravest concern that the nuclear test and missile activities carried out by the Democratic Peoples' Republic of Korea have further generated increased tension in the region and beyond, and that there continues to exist a clear threat to international peace and security."
The document calls on Iran to carry out a "transparent dialogue" over its controversial nuclear programme.
"We are profoundly concerned by Iran's continued lack of transparency regarding its nuclear activities and its stated intention to continue and expand enriching uranium," it says.
The UN Security Council earlier this month approved a fourth round of sanctions against Tehran for failing to halt nuclear enrichment. The measures include tighter finance curbs and an expanded arms embargo, but not the crippling sanctions the US had wanted.
On Gaza, the communique says the G8 leaders "deeply regret" the loss of life and injuries in the aid flotilla that was stormed by Israeli commandos last month as it was approaching the Palestinian territory. Nine Turkish activists died on board the flotilla's main ship.
In a reference to the Israeli blockade of the Palestinian territory, which is controlled by Islamist group Hamas, it says: "We urge all parties to work together... to ensure the flow of humanitarian and commercial goods and persons, to and from Gaza. The current arrangements are not sustainable and must be changed."
Poverty of ambition
The grouping concedes that the global economic crisis had jeopardised the chances of meeting the UN's development goals by the target year 2015, and that renewed aid commitments are necessary.
It says supporting development remains a cornerstone of the G8's approach, and that the countries will meet their obligations.
But BBC diplomatic correspondent Bridget Kendall, in Toronto, says that unlike last year, the G8 has sidestepped any mention of the aid targets they set themselves five years ago at their Gleneagles summit, some of which have still not been met, and focused instead on maternal health and child mortality.
On Friday, the G8 agreed to donate $5bn (£3.3bn) over five years towards improving the health of mothers and young children in the developing world.
Our correspondent says that the immediate response from aid agencies has been dismay, and that they have accused G8 leaders of moving from "ambition on poverty in 2005 to poverty of ambition in 2010".
Efforts to bridge differences over budget policy dominated Friday's talks before Saturday's discussions on global security.
The twin summits, being held in and near Toronto, have come at a time when largest economies are divided over whether to cut deficits or stimulate economic growth.
President Obama is worried that a series of austerity measures announced by European countries may delay global recovery.
The G8 leaders will be joined by China and other rising economic powers for the G20 summit.
Mr Obama has called for the group to pull together to promote economic growth, saying that world economies are "inextricably linked".
BBC economics correspondent Andrew Walker says there is a dilemma for the group on the best timing for fixing debt problems.