Friday's meeting in Hamburg between US President Donald Trump and his Russian counterpart, Vladimir Putin, was only planned for a half hour, but it lasted for over two.

"President Putin and I have been discussing various things, and I think it's going very well," Trump told reporters, sitting alongside the Russian leader. "We've had some very, very good talks. ... We look forward to a lot of very positive things happening for Russia, for the United States and for everybody concerned. And it's an honor to be with you," he told Putin.

"I am delighted to be able to meet you personally, Mr President," Putin said.

The main result of their discussions was the confirmation of an agreement on a ceasefire in southwestern Syria, which is to start at noon Damascus time (0900 UTC) on Sunday. It is the first US-Russian effort under the Trump presidency to curtail even part of Syria's six-year civil war. The Jordanian government is also reported to be involved in the accord.

"Today in Amman, Russian, American and Jordanian experts ... agreed on a memorandum of understanding to create a de-escalation zone" in the regions of Daraa, Quneitra and Sweida, Russian Foreign Minister Sergey Lavrov said Friday. "There will be a ceasefire in this zone from midday Damascus time on July 9."

Lavrov was among those sitting in on the talks between Trump and Putin in Hamburg. He said the ceasefire would be supervised by Russian military police "in coordination with the Jordanians and Americans."

Putin and Trump in Hamburg

US confirms collaboration

US Secretary of State Rex Tillerson confirmed the agreement and said it showed that Washington and Moscow were able to work together. "Let me characterize: The meeting was very constructive; the two leaders, I would say, connected very quickly," said Tillerson, adding: "There was a very clear positive chemistry between the two."

"We had a very lengthy discussion regarding other areas in Syria that we can continue to work together on to de-escalate the areas and the violence, once we defeat ISIS," he said using an acronym for the Islamic State group.

Tillerson said the area covered by the ceasefire affected Jordan's security and was a "very complicated part of the Syrian battlefield."

The secretary of state hinted at other issues raised, including Russia's alleged meddling in last year's US elections. He said the discussions had begun with Putin being pressed about "the concerns of the American people regarding Russian interference in the 2016 election," which Putin again denied.

"The presidents rightly focused on how do we move forward from what may be simply an intractable disagreement at this point," Tillerson said.

Jordan confirmed it was party to the "tripartite agreement" with Russia and the United States. "A ceasefire will take place along a line of contact agreed upon between the Syrian government forces and associated troops on one side and rebels on the other," government spokesman Mohammed Momani said.

"The three nations voiced their commitment to working on a political solution" based on UN-backed talks in Geneva and UN Security Council Resolution 2254, Momani was quoted as saying by the official Petra news agency.

G20 leaders take part in the group photo at Hamburg's Elbphilharmonie

Delaying Beethoven in Hamburg

German Chancellor Angela Merkel, who hosted the G20 members for an evening dinner and concert, praised the talks between Trump and Putin.

"We are very pleased that they are meeting each other," Merkel said as she and other G20 participants waited at the city's Elbphilharmonie concert hall to hear Beethoven's Ninth Symphony, which includes the "Ode to Joy" theme adopted by the European Union as its anthem.

Putin arrived in the concert hall, which was under strong police protection, 10 minutes later than planned, while Trump and his wife, Melania, were the last to arrive. The concert started 35 minutes later than scheduled.

Others attending were Canadian President Justin Trudeau with his wife, Sophie Gregoire; French President Emmanuel Macron with his wife, Brigitte; Argentine President Mauricio Macri with his wife, Juliana; European Commission President Jean-Claude Juncker, European Council President Donald Tusk; and the head of the International Monetary Fund, Christine Lagarde. Notable by his absence was Turkish President Recep Tayyip Erdogan.

Across the river, protesters danced in the streets as they played rock music very loudly in a bid to disrupt the evening.

On Saturday, the G20 summit continues with efforts to forge a consensus on trade and climate change. Deals were being drafted overnight in the hope of finding agreements which were hard to find on the first day of the summit. "The sherpas have a lot of work ahead of them tonight," Merkel said, referring to the trade dossier. "I hope they can bring us a good result tonight. But here the discussions are very difficult; I don't want to talk around that."

There were protests and standoffs between demonstrators and police throughout the day

Protests in the city

Outside the heavily guarded conference hall and summit venues, protesters had been voicing their opposition to the summit all day.

Cars were set on fire and shop windows smashed as protesters moved sometimes violently from one part of the city to another. Police called in reinforcements from other German states.

Merkel said she could understand peaceful protest, but demonstrations which "put people's lives in danger, put the protesters own lives in danger ... are unacceptable."

German special forces in Hamburg following clashes with demonstrators

Police said 196 officers had been injured, 83 demonstrators temporarily detained and another 19 taken into custody as protests continued into the night. Police worked into the night dismantling burning barricades. They described the situation as "very serious." Protesters torched cars and trucks, smashed windows of banks, looted retail stores, and hurled paving slabs and other objects, before police managed to restore order.

The most dramatic event overnight was the police pursuit of members of a black bloc group across scaffolding as thick smoke billowed from barricades below.

Police appealed to media and private individuals not to film or distribute images of their operations, saying that could endanger officers. "It is an appeal and has nothing to do with censorship," Hamburg police said via Twitter just after midnight.

A peaceful majority

A police spokesman said only small numbers of far-left or anarchist protesters were involved in the disturbances, while the majority of an estimated 100,000 demonstrators remained peaceful. There was condemnation from protest organizers of the violence and looting of shops - including a local pharmacy which has provided apprenticeships for refugees.

On Friday, Hamburg's fire department reported that ambulances had transported 60 civilians to the city's hospitals - including 11 people who were severely injured when they fell off a wall after fleeing from riot police.

G20 participants praised the work of the police, but some said they had never seen protesters so close to such a summit before.