Negotiators at G-20 talks in Hamburg, Germany, are working on a final statement, with climate change as the only outstanding issue, officials say.
They say a joint position on trade has been agreed, with all countries pledging to resist protectionism.
Meanwhile leaders have held separate talks. President Donald Trump met British PM Theresa May, and said a US-UK trade deal would be signed soon.
The final talks come after a second night of violent protests in Hamburg.
Negotiators worked through the night in an attempt to reach a compromise on the wording of the summit statement – which is expected later on Saturday.
The host, German Chancellor Angela Merkel, held a working breakfast with Presidents Putin of Russia and Macron of France. On Friday had described the first day of talks as “very difficult”.
But early on Saturday, an EU official told Reuters news agency: “The outcome is good. We have a communiqué. There is just one outstanding issue on climate.” He added that the statement included a pledge to “fight protectionism”.
Mr Trump, after his morning meeting with Ms May, said he expected a “very powerful” trade deal between the two countries “very quickly”.
The G20 (Group of Twenty) is a summit for 19 countries, both developed and developing, plus the EU.
A fractious summit, by James Robbins, BBC Diplomatic Correspondent
The draft conclusions seen by the BBC are causing deep concern to most G-20 members. The present text recognises Donald Trump’s rejection of the Paris climate agreement to limit rising temperatures.
But the US also insists on stating its determination to “work closely with other partners to help their access to and use of fossil fuels more cleanly and efficiently”. This is something most other members don’t want in the text, as it can be seen as an endorsement of continuing use and export of fossil fuels, including coal and oil.
The present deadlock is important, and reflects a very divisive summit in which the rest of the world has been struggling to come to terms with the president’s “America first” rejection of the whole concept of global commitment to free trade as well as collective action against global warming.
Why do parts of Hamburg resemble a war zone?
Mrs Merkel’s comments came amid large protests on the streets of Hamburg, with demonstrators and armed police clashing into the early hours of Saturday.
Demonstrators – who were protesting against the presence of Mr Trump and Mr Putin, climate change and global wealth inequalities – set fire to vehicles and barricades, threw rocks at officers and looted shops.
At one point, police chased protesters across rooftops while officers on the streets used water cannon on protesters.
Nearly 200 police officers were injured during the protests. Dozens of protesters have been detained.
What happened when Trump met Putin?
On Friday, Mr Trump used his first meeting with Russian President Vladimir Putin on the sidelines of the G20 to discuss the alleged Russian hacking of last year’s US presidential election.
Both sides called the meeting positive – but differed in their descriptions of the hacking discussion.
Russian Foreign Minister Sergei Lavrov said “President Trump said he heard clear statements… that Russian authorities did not intervene [in the US election], and he accepted these declarations.”
However, US Secretary of State Rex Tillerson said Mr Trump “opened the meeting with President Putin by raising the concerns of the American people regarding Russian interference in the 2016 election.
“They had a very robust and lengthy exchange on the subject. The president pressed President Putin on more than one occasion regarding Russian involvement.”
He said it was not clear whether the two countries would ever come to an agreement on what happened.
Other topics discussed during their meeting included the war in Syria, terrorism and cybersecurity.
Powered by WPeMatico