German Chancellor Angela Merkel pressed fellow Group of 20 leaders to compromise at the start of talks on climate and trade that have pitted US President Donald Trump against virtually every other country in the club of leading economies.
The host of the G20 summit addressed her counterparts in a hall at the Hamburg convention center.
Ms Merkel was shown talking casually with Mr Putin as the leaders entered the hall, then joining French President Emmanuel Macron in a three-way discussion with Mr Trump, who was seated between Chinese leader Xi Jinping and Britain's Theresa May.
"We all know the big global challenges and we know that time is pressing," Ms Merkel told the group.
"And so solutions can only be found if we are ready for compromise and move toward each other, but without - and I stress this - bending too much, because of course we can also state clearly when there are differences."
Mr Trump later held bilateral talks with Mexican President Enrique Pena Nieto and Russian President Vladimir Putin.
The meeting with the Russian leader is drawing intense scrutiny because of Mr Trump's election campaign pledge to seek a rapprochement with Moscow. So far he has been unable to deliver on that promise amid accusations from US intelligence services that Russia meddled in last year's presidential election and investigations into the Trump campaign's links to the country.
Ms Merkel, who is gearing up for a parliamentary election in September, faces the daunting task of steering the G20 toward a consensus on trade, climate change and migration - all issues that have become more contentious since Mr Trump entered the White House.
Last month he pulled the United States out of a landmark international agreement aimed at combating climate change. And he is threatening to take punitive trade measures in the steel sector which would hit China, Germany, Canada and a host of other countries.
The Chinese state news agency Xinhua reported that President Xi had called on G20 nations to strengthen macroeconomic policy coordination and forestall risks in financial markets.
"Xi also urged G20 members to develop financial inclusion and green finance to make the financial sector truly drive the development of the real economy," Xinhua added.
Envoys have been working for weeks to bridge differences, and European sources said they had come up with new language on the climate issue on Thursday which would be put to the leaders for approval.
The latest draft communique sticks with language about the Paris climate accord being "irreversible" but removes a reference from an earlier version to a "global approach" that some countries felt could suggest there was a parallel track to Paris.
It also includes a new paragraph which says the United States will "work closely with other partners to help their access to and use of fossil fuels more cleanly and efficiently". Some experts were sceptical whether leaders would approve the reference to fossil fuels, which would be a clear nod to Washington.
Earlier, leaders of the BRICS countries - Brazil, Russia, India and China - called on the G20 to push for implementation of the Paris climate deal despite Mr Trump's decision to pull out.
Protests surround talks
As the leaders met, police said they were sending reinforcements from other parts of Germany to cope with thousands of anti-capitalist protesters who set fire to cars, rubbish bins and wooden pallets in violence that Hamburg's interior minister called "frightening".
US First Lady Melania Trump was prevented from leaving her hotel to join a harbour tour because of security concerns, her spokeswoman said. German Finance Minister Wolfgang Schaeuble cancelled an appearance in downtown Hamburg.
Police said 160 officers had been injured, 45 protesters temporarily detained and another 15 taken into custody.
"We have to expect everything, and we are expecting everything," Hamburg Interior Minister Andy Grote said.
Ms Merkel chose Hamburg, the port city where she was born, to send a signal about Germany's openness to the world, including its tolerance of peaceful protests.
The summit is being held only a few hundred meters from one of Germany's most potent symbols of left-wing resistance, a former theatre called the "Rote Flora" which was taken over by anti-capitalist squatters nearly three decades ago.