Media playback is unsupported on your device Media caption Donald Trump: "This was a very big day for free and fair trade"

The US and EU have agreed to avoid an all-out trade war and work to lower tariffs, in talks that US President Donald Trump hailed as "a very strong understanding".

He and European Commission chief Jean-Claude Juncker announced a "new phase" in EU-US relations, after Wednesday's meeting at the White House.

Mr Trump's threat to impose tariffs on European cars was put aside.

The EU plans to buy more US liquefied natural gas (LNG) and soybeans.

A joint statement said the two leaders agreed to "work together toward zero tariffs, zero non-tariff barriers, and zero subsidies on non-auto industrial goods".

US import tariffs of 25% on steel and 10% on aluminium, imposed in March, will however remain in place.

A working group of senior advisers will meet to facilitate trade and lower barriers. The two sides pledged to refrain from new trade restrictions during those negotiations.

A full-blown trade war had been looming, fuelled by the tariffs introduced by Mr Trump.

EU-US relations had been further frayed by Mr Trump's tributes to Russian President Vladimir Putin and his attacks on Nato and the EU.

Mr Trump's language after meeting Mr Juncker was enthusiastic, in contrast with the angry tone he adopted previously towards the EU, calling it a "foe" on trade.

Mr Trump has come under pressure domestically because of retaliatory tariffs imposed on US goods by China, the EU, Canada and Mexico.

US chipmaker Qualcomm Inc appeared to be the latest casualty of the trade row with China. It dropped a $44bn (£33.5bn) bid to take over NXP Semiconductors, after China failed to give approval for it.

On Tuesday the Trump administration announced up to $12bn in aid for US farmers hurt by the Chinese tariffs.

What was agreed?

Speaking at the White House, Mr Trump declared a "new phase in the relationship" between the US and the EU, calling it a "very big day for free and fair trade".

Mr Juncker thanked the president and hailed a "constructive meeting".

Mr Trump said the EU would become a "massive buyer" of US liquefied natural gas and the joint statement said EU imports of LNG would increase, to diversify Europe's energy supply.

Mr Trump has condemned Germany's project to expand imports of Russian natural gas, via a new Baltic pipeline.

"The EU is going (...) to buy a lot of soybeans from our farmers, primarily in the Midwest," Mr Trump said.

Some relief after months of turbulence

Adam Fleming, BBC News, Brussels

EU officials have been giving more details of the deal brokered in Washington. The working group will investigate long-term ways to reduce tariffs on industrial goods - not cars or agricultural products - and how to bring down the extra tariffs on steel and aluminium recently applied by US authorities.

It will report at the end of November - after the midterm elections in the US.

The pledge to buy more American soybeans is actually a promise not to interfere in market forces that mean the EU is buying more anyway. "We are not turning into a Soviet-style economy," said an official.

And this is not a revival of the controversial TTIP trade pact between the EU and US or a big free trade agreement. That would take much longer and would require the consent of the EU member states.

Media playback is unsupported on your device Media caption Many American farmers say they support US President Trump's approach to trade

The pair also agreed to work towards reform of the World Trade Organization (WTO). Mr Trump accuses the WTO of treating the US unfairly - though mostly the US has won in arbitration cases there.

Mr Juncker said striking a deal on zero tariffs on industrial goods was his "main intention".

"I had one intention today, to make a deal, and we made a deal. We have a number of areas on which to work together," he said.

No announcement was made on car tariffs, and it was not clear whether any progress had been made on resolving the issue. Mr Trump had threatened to impose 25% import tariffs on European cars.

What's been the reaction to the agreement?

On Twitter, EU Trade Commissioner Cecilia Malmstrom said the two were "turning a page" on trade, while German Economy Minister Peter Altmaier hailed it as a "breakthrough".

German Foreign Minister Heiko Maas tweeted (in German): "Juncker showed in Washington that it's really not about who tweets most aggressively, but about whether one offers real solutions. Because Trump's grassroots also feels that it only loses when we impose more and more senseless tariffs on each other."

French Finance Minister Bruno Le Maire welcomed the agreement, but called for "clarifications". He said there was no point trying to clinch any major trade deal with the US. Agriculture must be excluded, he said, because Europe could not compromise on food safety and environmental standards.

Mr Trump scorned the proposed EU-US Transatlantic Trade and Investment Partnership (TTIP), which stalled two years ago. But his "deal" with Mr Juncker echoes some of TTIP's ambition.

A former US Ambassador to the EU, Anthony Gardner, made that point in a tweet.