The G20 summit in St Petersburg has ended without world leaders agreeing on the need for military action against Syria, in response to a chemical attack in Damascus last month.

At a news conference US President Obama said that most G20 leaders agreed with him that the Syrian regime carried out a chemical attack.

However, he said they were divided on whether or not to respond with military force, without the approval of the United Nations Security Council.

Mr Obama said his conversation with the Russian President Vladimir Putin on the margins of the summit was candid and constructive.

The two leaders met for 20 minutes but remained at odds over the conflict in Syria, Mr Putin's senior foreign policy adviser said.

"They sat down before today's working session, in armchairs, and had a 20-minute chat, one on one," the adviser, Yuri Ushakov said.

He said Syria was the main topic and said: "No, their [positions] have not come closer."

The US President refused to tell reporters whether or not he would order a military strike on Syria with approval from the US Congress.

Mr Obama said he would address the American people on the subject of Syria from the White House on Tuesday.

Both Russia and the international peace envoy for Syria have warned that US military action against Syria would be illegal without UN Security Council approval.

They also said it would undermine the chances for a political solution to the conflict.

Remarks by UN-Arab League envoy Lakhdar Brahimi and Russian Foreign Minister Sergei Lavrov added to pressure on President Barack Obama to refrain from ordering strikes.

"International law says that no country is allowed to take the law into their hands - they have to go through the Security Council," Mr Brahimi told reporters in a joint appearance with Mr Lavrov at the summit.

Mr Lavrov said that "a clear understanding is taking shape among many responsible states that the use of force, bypassing the Security Council, would essentially put an end to efforts to reach a political settlement and convene an international conference".

Russia and the United States announced in May that they would try to bring the Syrian government and opposition together at a peace conference known as Geneva II.

Mr Brahimi said military action would hurt the chances of it ever happening.

Alternatives have been 'exhausted'

US Ambassador to the United Nations Samantha Power said Syrian President Bashar al-Assad had barely dented his stockpile of chemical weapons in last month’s alleged attack.

"We assess that although Assad used more chemical weapons on 21 August than he had before, he has barely put a dent in his enormous stockpile," she said at the Center for American Progress think tank in Washington.

"We have exhausted the alternatives" to military action, she said, adding that Assad must have weighed the fact that Russia would back him in the controversy over his alleged use of chemical weapons and it was naive to think Russia would change.

Earlier, China's Foreign Ministry urged a role for the UN Security Council in resolving the crisis in Syria.

It came after the United States said it had given up trying to work with the council on Syria, accusing Russia of holding it hostage.

US Ambassador to the United Nations Samantha Power yesterday said she saw no viable path forward at the UN Security Council.

The comments again suggested that the US would not seek UN approval for a military strike on Syria in response to a suspected chemical attack near Damascus.

The US believes that over 1,400 people were killed in the attack.

Meanwhile, world leaders meeting at the G20 summit in Russia have failed to find common ground on the issue.

It is reported that France, Turkey, Canada and Britain gave strong backing to Mr Obama's call for military action.

But Russian President Vladimir Putin said it was still not clear which side in the conflict had used the chemical weapons.

Ms Power said a draft resolution Britain submitted to the five permanent council members last week calling for a response to that attack was effectively dead.

Asked about those comments, Chinese Foreign Ministry spokesman Hong Lei said the Security Council needed to be used.

"China supports the important role that the UN Security Council plays in properly resolving the Syria issue," Mr Hong told a daily news briefing in Beijing.

"We hope that relevant parties can continue communications and coordination and hold deep consultations so as to resolve the relevant issue in a peaceful way," he added.

China has called for a full and impartial investigation by UN chemical weapons inspectors in Syria into the attack, and has warned against pre-judging the results.

It has also said that whoever uses chemical weapons had to be held accountable.

US intercepts Iranian attack plans

Elsewhere. the US has intercepted an order from an Iranian official instructing militants in Iraq to attack US interests in Baghdad in the event the Obama administration launches a military strike in Syria, the Wall Street Journal has reported.

The US embassy in Baghdad was a likely target, according to unnamed US officials quoted by the newspaper.

The paper said the officials did not describe the range of potential targets indicated by the intelligence.

In addition, the State Department issued a warning yesterday telling US citizens to avoid all but "essential" travel to Iraq.

President Obama has asked the US Congress to back his plan for limited strikes in response to the 21 August attack.

The newspaper reported that the Iranian message was intercepted in recent days and came from the head of the Revolutionary Guards' Qods Force.

The newspaper said the message went to Iranian-supported Shia militia groups in Iraq.

It reported that the message informed Shia groups to be prepared to respond with force after any US military strike on Syria.

"Travel within Iraq remains dangerous given the security situation," according to the State Department's warning.

The department said that numerous insurgent groups, including al-Qaeda's Iraq affiliate, remain active and "terrorist activity and sectarian violence persist in many areas of the country at levels unseen since 2008".

It added: "The ability of the embassy to respond to situations in which US citizens face difficulty, including arrests, is extremely limited."

The State Department and CIA declined to comment.

Iran discusses crisis with Gilmore

The Iranian Foreign Ministry has released a statement, saying its foreign minister had condemned the use of chemical weapons and called for a political solution to the crisis in Syria in a phone call with Tánaiste and Minister for Foreign Affairs Eamon Gilmore.

The statement said: "While talking to his Irish counterpart, Zarif stressed the need for adopting diplomatic solutions for the Syrian crisis and also rejected any kind of indulging in violent ways, a statement by the Foreign Ministry reported on Wednesday.

"Zarif, for his part, condemned the use of chemical weapons by any party and in any way and also criticized those countries that were seeking war in the region regardless of its consequences.

"He also warned against the unfavourable impact of such attitudes on the overall security in the region and hoped that international community would focus on working out political solutions to the problems in Syria."