​The foreign ministers of France and Germany voiced cautious optimism Friday about the willingness of the Trump administration to engage on Syria, after new U.S. Secretary of State Rex Tillerson took part in a discussion about the issue on the sidelines of a diplomatic summit in Bonn, Germany.

French Foreign Minister Jean-Marc Ayrault said the meeting was "particularly useful," noting that the meeting came a week before the UN-backed peace talks in Geneva are due to resume.

"It is important and absolutely instrumental for us to have a close dialogue with the United States on the Syrian issue and on many other issues," Ayrault told reporters.

His German counterpart, Sigmar Gabriel, said Tillerson had "participated vigorously" in the discussion, which also included top envoys from Italy, Britain, Saudi Arabia, the United Arab Emirates, Qatar, Jordan and the European Union.

Gabriel said those who participated agreed that only a political solution could bring lasting peace to Syria, which has been shaken by conflict for almost six years.

Tillerson told nations opposed to Syrian President Bashar al-Assad that the U.S. would not co-operate militarily with Russia until it stopped labelling all Assad's opponents as terrorists, according to a Western diplomat who spoke to Reuters on Friday.

"In the discussion, he made it clear that there would not be military co-operation until the Russians accepted that not all the opposition are terrorists," the diplomat said.

Countries that oppose Assad include Saudi Arabia, Turkey, France and Britain. 

MIDEAST-CRISIS/SYRIA-IDLIB

Boys walk at a site hit by airstrikes in the rebel-held city of Idlib, Syria on Feb. 7. Syria has been shaken by war for almost six years. (Ammar Abdullah/Reuters)

Russia, which has provided military backing to the Assad government in its fight against a broad range of opposition forces, didn't take part in the talks on the sidelines of a two-day meeting of foreign ministers from the G20 leading industrialized and emerging economies.

Gabriel noted, however, that Russia's support was crucial for progress to happen at the peace talks. "On its own the regime in Damascus won't conduct any serious negotiations," he said.

Ayrault reiterated France's position that Assad can't be part of a future Syrian government, adding that Europe wouldn't finance the rebuilding of the country if he is.

Following the meeting on Syria, diplomats from all of the G20 nations discussed conflict prevention ahead of a scheduled working lunch where the topic was to be co-operation with Africa.

With files from Reuters