Hangzhou, China (CNN) US President Obama says an agreement with Russia on ending the violence in Syria is being hampered by "gaps of trust" between the two governments.

Asked by CNN's Michelle Kosinski about his meeting with Russian President Vladimir Putin, the President described it as "candid" and "blunt" focusing mainly on Syria and Ukraine.

Mr. Obama called the discussion on Syria "productive" about what a real cessation of hostilities would actually look like.

"We have had some productive conversations about what a real cessation of hostilities would look like that would allow us both... to focus our attention on common enemies."

No Syria deal between US and Russia

No Syria deal between US and Russia 01:48

No Syria deal between US and Russia

Obama added that currently the gaps have not been closed in negotiations between Russia and the US in a way that they think would "actually work." Obama urged Kerry and Lavrov to work together in the coming days to get aid to those in need.

Obama and his Russian counterpart Putin met Monday as talks between their governments on ending violence in Syria ended without an agreement.

Meanwhile, Putin told reporters that a deal with the US to "ease tensions in Syria" may come "within a few days," according to Russia's state news agency TASS.

"Against all odds we have a certain rapprochement and understanding of what we might do to ease tensions in Syria and achieve mutually acceptable solutions," TASS quoted Putin as saying.

As for further details on the agreement, Putin said, "It is early now to speak of any parameters of our agreements, but I hope very much that the agreements will be reached, and I have the grounds to believe that this may happen within a few days," according to TASS.

The two leaders conversed on the sidelines of the Group of 20 summit here for ninety minutes, a senior US official said, and worked to clarify gaps in negotiations over on the Syrian crisis. The pair also discussed Ukraine and Russia's cyber intrusions, the official said.

The exchange came after talks between Secretary of State John Kerry and his Russian counterpart Sergey Lavrov failed to result in a Syria ceasefire agreement. They had been working to negotiate a plan that would have boosted military cooperation between the two nations in an effort to better target terrorists and prevent civilian deaths.

JUST WATCHED G20 sees tension between China and the US press Replay More Videos ... MUST WATCH G20 sees tension between China and the US press 01:20

Negotiators failed to work through differences, and the talks have ended for now. Following Obama's meeting with Putin, an official said the leaders indicated a desire for Kerry and Lavrov to reconvene deliberations in the coming days.

"It was constructive," a US official said after the meeting, noting that all differences were not resolved. The official spoke anonymously to discuss a private conversation.

"It's clear now what our respective positions are," the official said. "And we'll see in coming days whether on Syria we can reach a near-term agreement. If we cannot get the type of agreement we want, we will walk away from that effort."

Differences between the two sides are technical, the official indicated, suggesting the divide was at a level that Obama and Putin wouldn't negotiate themselves.

"President Obama and President Putin were not going to get down into the weeds of the language of an agreement and the implementation associated with the agreement," the official said.

Photos of the session distributed by the Kremlin show the two leaders and aides, including Kerry and US National Security Adviser Susan Rice, seated around a table. The presidents appeared in congenial moods, with one photo showing Putin smiling broadly.

JUST WATCHED U.S. allies fight each other, as well as ISIS Replay More Videos ... MUST WATCH U.S. allies fight each other, as well as ISIS 02:50

Both Russian and US officials said the meeting -- which was held in a conference room at the G20 summit site here -- lasted longer than planned, and that leaders spent the bulk of their meeting discussing Syria.

JUST WATCHED 'This is Hell': Clarissa Ward addresses U.N. on Syria Replay More Videos ... MUST WATCH 'This is Hell': Clarissa Ward addresses U.N. on Syria 09:11

Cautious optimism

On Sunday, cautious optimism prevailed that a deal could be struck between Washington and Moscow, long at odds over policy in Syria. Kerry and Lavrov had been working "around the clock" to come to an agreement, Obama told reporters.

Russian forces have aligned with Syrian President Bashar al-Assad to target US-backed opposition fighters that Moscow and Damascus claim are terrorists. The campaign has spurred a humanitarian crisis and caused millions of Syrians to flee for Europe.

The US hopes to align with Russia to identify terrorist targets, including ISIS and the Nusra Front, a group formerly tied to al-Qaeda. Officials hope a ceasefire will help advance talks on a political transition that would lead to the resignation of Syrian leader Bashar al-Assad.

Any deal to end widespread suffering in Syria was likely to be met with doubt after past settlements, including a ceasefire agreed to in February, failed -- a fact Obama acknowledged on Sunday.

"Given the failure of previous cessations of hostilities to hold, we approach it with some skepticism," Obama said.

But he insisted any work toward easing the deeply troubling humanitarian crisis was valuable.

"It is worth trying," he said. "To the extent that there are children and women and innocent civilians who can get food and medical supplies and, you know, get some relief from the constant terror of bombings, that's worth the effort."

Russia and the US

A deal on Syria could place US-Russia ties in a firmer position as Obama prepares to leave office. Deep divides over Syria have marred Obama's relationship with Putin, adding to a litany of discord between the US and Russia that's driven relations to their lowest level since the Cold War.

JUST WATCHED This is what the aftermath of a barrel bombing looks like Replay More Videos ... MUST WATCH This is what the aftermath of a barrel bombing looks like 00:59

This week's interaction between the two men could be a final attempt to salvage what's become one of the most acrimonious relationships on the global stage. Putin's persistent support for the Syrian regime, Moscow's moves in Ukraine and the charge that Russia may be meddling in the US presidential contest have built a deeply antagonistic dynamic between the two leaders.

Obama said on Sunday that Russian participation was essential.

"Our conversations with the Russians are key because, if it were not for the Russians, then Assad and the regime would not be able to sustain its offensive," he said.