Merkel told reporters she had explained to Trump during a G7 summit in Sicily that the surplus was due in part to factors out of Germany's control and had also highlighted the extent of job-creating German direct investment in the United States.

The two agreed to set up a working group that will exchange information on bilateral economic ties, a step German officials said was designed to forestall any punitive measures from Washington based on an incomplete picture of the relationship.

The exchange between the leaders came after German media reported on Friday that Trump had sharply criticised Germany in a private meeting on Thursday with European Commission President Jean-Claude Juncker and European Council President Donald Tusk.

Spiegel reported that Trump had told Juncker and Tusk: "Look at the millions of cars that they are selling in the United States. It's horrible. We'll stop it."

White House economic adviser Gary Cohn confirmed some details from the reports, but played them down. "He said they're very bad on trade, but he doesn't have a problem with Germany," Cohn told reporters in the resort town of Taormina.

Cohn said Trump had pointed out during the meeting with Juncker and Tusk that his father had German roots in order to underscore the message that he had nothing against the German people.

Trump's spokesman Sean Spicer said Trump had "tremendous respect" for Germany and had only complained about unfair trade practices in the meeting.

UNSETTLING

Earlier, Juncker called the reports "exaggerated".

"The record has to be set straight," Juncker said. "It's not true that the president took an aggressive approach when it came to the German trade surplus."

But the persistent focus on Germany's surplus has unsettled Merkel's government.

Peter Navarro, a Trump trade adviser, has repeatedly criticised Germany and suggested it is deliberately pushing down the value of the euro, an argument the Germans reject, noting that the currency's strength is largely determined by policies of the independent European Central Bank.

The German trade surplus, which reached a record 253 billion euros (221.18 billion pounds) in 2016, has also been a source of contention within Europe, with Berlin's partners encouraging it to do more to promote domestic demand.

The United States had a $64.9 billion trade deficit with Germany in 2016, according to U.S. government data, down from a $74.8 billion deficit the year before.

Trump's attack on German automakers has raised eyebrows, in part because firms like BMW (>> Bayerische Motoren Werke AG), Daimler (>> Daimler AG) and Volkswagen (>> Volkswagen AG) - like their Japanese and Korean rivals - build many of their cars in the United States.

Together, the three big German automakers employ tens of thousands of people at U.S. factories and dealerships, and operate large vehicle assembly factories in several states that voted for Trump in the 2016 election, including South Carolina, Alabama and Tennessee.

U.S. consumers bought about 846,000 German-made cars and light trucks assembled in 2016, according to data compiled by Autodata, which tracks vehicle sales. That represented about 4.8 percent of total U.S. vehicle sales last year.

(Additional reporting by Steve Holland and Joe White; Writing by Noah Barkin, editing by Crispian Balmer)

By Andreas Rinke

Stocks treated in this article : Bayerische Motoren Werke AG, Daimler AG, Volkswagen AG