But Obama said he was encouraged by the talks and said there was a growing notion that "the world cannot stand idly by" as the bloody conflict drags on.
The U.S. president met perhaps the most fervent resistance to a strike from Russian President Vladimir Putin, who said the United States would be acting "outside the law" if Obama were to order military action against the forces of Syrian President Bashar Assad.
"I remind you that the use of force by a sovereign government is possible only when it is in the form of self-defense — and the United States, as is known, is not being attacked by Syria — and, secondly, by a resolution of the UN Security Council," Putin said, speaking emphatically, at a news conference at the summit's close.
"As one of the participants of our discussion yesterday put it, those who act otherwise are putting themselves outside the law."
Putin, a staunch Assad ally, said that he and Obama met briefly about Syria on the sidelines of the summit — Putin's foreign policy advisor Yury Ushakov told reporters that the meeting lasted around 20 minutes — but that their positions did not change.
"It was a very substantive, constructive, friendly conversation. In a friendly setting, in any case. We each maintained our positions, but there is dialogue," Putin said, adding that they agreed to have Russian Foreign Minister Sergei Lavrov and U.S. Secretary of State John Kerry resume talks on the issue in the near future.
After the White House cancelled a bilateral meeting between Obama and Putin originally scheduled to take place before the summit, over Russia's granting of asylum to leaker Edward Snowden and a lack of progress on other issues, there had been no scheduled meeting between the U.S. and Russian leaders.
Although the economy is typically the focus of G20 meetings of top world leaders, the debate over the U.S. proposal to strike Assad's forces stole the spotlight over two days of talks at the Peterhof palace estate.
In conversations with his counterparts, Obama continued his efforts to gain support for military action without a UN Security Council resolution, but he met with opposition from many camps, including the EU leadership and top UN officials.
Emphasizing the fractured nature of the world's top powers on the issue, Putin listed which countries supported and opposed the U.S. proposal of a military strike. In support, he said, were the U.S., Turkey, Canada, Saudi Arabia and France, with British Prime Minister David Cameron also in that camp, although British parliament voted against the plan. Putin said those against a strike included Russia, China, India, Indonesia, Argentina, Brazil, South Africa and Italy, and he noted that Germany had ruled out participating in military action.
Perhaps the strongest words of support for the U.S. plan came from French President Francois Hollande, who repeatedly referred to Assad as a dictator and argued that a military strike could have a significant impact.
"There is no military solution for the Syria crisis, but a short military action can [speed up] the political solution," Hollande said at a news conference.
Hollande also said that every country at the summit acknowledged that chemical weapons were used in the Aug. 21 attack in a Damascus suburb.
Obama may have been at a disadvantage trying to convince leaders to oppose Putin's position while on Russian soil. Looking worn out at his press conference after days of travel and tough negotiations, the U.S. leader acknowledged that Russia was not likely to come around to his position. He said many other countries would be releasing statements regarding Syria.
Obama also said Russia and other nations would eventually have to put aside their differences and work to find a political solution to the Syria conflict.
Chinese President Xi Jinping, who has been a less visible opponent of military action in Syria than Putin, also met with Obama and reiterated China's position.
"A political solution is the only right way out for the Syria crisis, and a military strike cannot solve the problem from the root," Xi told Obama, according to Chinese state news agency Xinhua.
The Chinese leader also said all countries should abide by international law and reject the use of chemical weapons, and he renewed calls for a peace conference between the Assad regime and Syrian rebels that the U.S. and Russia, together with the UN, had been trying to arrange in Geneva.
Lavrov said that a military strike not approved by the UN Security Council would foil those efforts.
"Many responsible governments are gaining a very clear understanding that the use of force in contravention of the UN Security Council would, in essence, put an end to efforts to achieve a political solution, to convene the Geneva-2 peace conference that [UN Special Envoy] Lakhdar Brahimi is directly working on," Lavrov told journalists after a working breakfast at the summit, Interfax reported.
Leaders also remained split over who was to blame for the alleged chemical weapons attack last month that killed hundreds of Syrians.
A group of 10 nations including Britain, Italy and Japan issued a statement saying that they, like the U.S., believed that Assad was behind the attack, while Putin repeated the Russian view that it was a "provocation" by a militant group seeking assistance from the West.
While political talks occupied the U.S. and Russian leaders, military posturing continued in the Mediterranean Sea, where U.S. and Russian ships have been stationed. On Friday, a Russian Navy representative told Interfax that four ships had traveled through the Dardanelles in Turkey heading for the eastern Mediterranean.
The ships included landing vessels Novocherkassk and Minsk, and a reconnaissance vessel, the Priazovye.
Putin said during his press conference that Russia would assist Syria if military action was taken against Assad's forces, noting that Russia already delivered arms and economic aid. He said he hoped to provide more humanitarian assistance to civilians, "who have ended up in a very difficult situation in that country."
No strike on Syria is expected by U.S. forces at least until after the U.S. Congress decides, perhaps this week, whether to back it. Obama refused to say how he would act if Congress votes against the action, while Hollande said that if the U.S. Congress did not approve an attack, France would not strike Syria alone but would expand support for the rebels opposing Assad.
Obama said he plans on Tuesday to address the American people, many of whom are war-weary after extended conflicts in Iraq and Afghanistan, on the issue.