Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

HAMBURG, Germany — A new chapter of the love affair between China and Germany is unfolding as the protectionist Trump administration targets both countries with tariffs.

The president this week once again raised the prospect of introducing a new 25 percent tariff on imported cars, rattling nerves in Germany — which exports $20 billion worth of vehicles to the U.S. annually.

The reason that the small truck business in the U.S. is such a go to favorite is that, for many years, Tariffs of 25% have been put on small trucks coming into our country. It is called the “chicken tax.” If we did that with cars coming in, many more cars would be built here..... — Donald J. Trump (@realDonaldTrump) November 28, 2018

Calls for further expansion of political and economic cooperation between Beijing and Berlin resonated loudly at this week's China Meets Europe summit in this northern German port city.

While China's drive to strengthen old trade relations and seek new alliances in Europe has raised red flags in Washington, German Chancellor Angela Merkel last year said Europeans "must really take our fate into our own hands." Her comments followed bruising G-7 and NATO meetings.

“In Germany, we are thinking about new strategic alliances because we have a feeling that we cannot trust our old alliances and that we need to adapt to a new world order,” said Henning Voepel, director of the Hamburg Institute of International Economics.

China is already Germany's top trading partner — with a volume of more than $204 billion in 2017, putting it ahead of the United States for the second consecutive year. But it is also waging a trade war with Washington.

More than half of Berlin's trade with Beijing is handled in the port city of Hamburg, which the Chinese respectfully call “Han Bao” or “Fortress of the Chinese” due to longstanding ties. Every third container in the port either arrives from China or is destined for it.

A total of more than 900 Chinese companies have branches in Germany, including 550 such firms that are based in Hamburg.

Voepel said American trade protectionism was costing the U.S. global influence — with China stepping in to fill the vacuum.

“In economic terms, China has been making rapid gains on the West for quite some time now, and the United States' apparent withdrawal from globalization is expediting China’s political upsurge,” Voepel said.

A poll published by the Pew Research Center this week found that 67 percent of Germans said their country should cooperate more with China, while only 41 percent said the same about the U.S.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

China is the world's second-biggest economy, while Germany is fourth.

China and the U.S. have traded tit-for-tat tariffs on goods worth hundreds of billions of dollars in sectors from automobiles to agriculture and energy.

"Europe, and in particular Germany, is very worried about an escalation of the trade conflict," said Marcel Fratzscher, president of the Berlin-based German Institute for Economic Research (DIW). "The concern is that, having dealt with Mexico, Canada and China, President Trump will pick on Europe next."

When Donald Trump first threatened tariffs on car imports this year, analysts warned that the measures could seriously impact the revenues of European carmakers.

“It could mean a significant 7 to 10 percent hit on 2019 earnings estimates to the main automakers in Europe,” Daniel Lacalle, chief economist at Tressis Gestion, told CNBC.

Executives with Germany’s leading carmakers — including Daimler, Volkswagen and BMW — are scheduled to attend a White House meeting on trade policies on Tuesday, according to media reports.

German Chancellor Angela Merkel and International Monetary Fund Managing Director Christine Lagarde react as President Donald Trump arrives late for a breakfast meeting discussion on gender equality at the G-7 summit in June. Neil Hall / EPA

In his opening speech at the summit, former German Chancellor Gerhard Schroeder said that Trump's "America First stance will bring about changes for all of us in trade, politics, as well as in foreign and security policies."

A. Wess Mitchell, the U.S. assistant secretary of state for European and Eurasian affairs, last month highlighted that Chinese investments in Europe totaled $318 billion last year.

Mitchell said that Beijing “owns or controls almost a tenth of Europe’s entire port capacity” and warned that the U.S. “must not see it as a foregone conclusion that countries will automatically remain friendly to America.”

But Wolfgang Ischinger, a former German ambassador to Washington who is now head of the Munich Security Conference, told this week's summit that the relationship with China "represents one of the greatest historic opportunities" for both Germany and the 28-country European Union.

Against the backdrop of China's trade war with the U.S. and supplemented by projects including its modern-day revival of the old Silk Road known as the Belt and Road Initiative, China is investing in trade infrastructure in more than 60 countries worldwide. German cities like Hamburg and Duisburg are becoming major logistics hubs for Europe-bound trains from China.

"Up to 30 trains a week are already currently making the trip between Hamburg and 27 Chinese cities," Hamburg Mayor Peter Tschentscher said.

China is focused on taking “the lead in world development and reform” together with its European partners, according to Li Yizhong, chairman of the China Federation of Industrial Economics.

He highlighted railway links that now connect 48 cities in China to 40 cities across the E.U.

Ragnar Kruse, the CEO and co-founder of advertising company Smaato, which was sold to Chinese firm Spearhead in 2016, said that the Chinese government is cutting red tape and "supporting new technologies with investments and incentives."

“Presently, we do more than 60 percent of our business in the United States and only 3 percent in China,” Kruse told NBC News on the sidelines of the summit in Hamburg.

However, he described China as "an extremely attractive growth market."

Chinese President Xi Jinping and German Chancellor Angela Merkel meet in Berlin last year. Fabrizio Bensch / Reuters file

But amidst all the enthusiasm and back-patting, there is also rising concern about Chinese investment in strategically sensitive companies.

Citing concerns over security implications — including industrial espionage and the loss of intellectual property rights — the German government has warned that it is prepared to use new powers to veto foreign takeovers. The European Union is due to soon adopt an investment screening mechanism.

Earlier this year, the head of Germany’s domestic intelligence service warned that the loss of key technologies could harm the German economy.

“Industrial espionage is no longer necessary if one can simply take advantage of liberal economic regulations to buy companies and then disembowel them or cannibalize them to gain access to their know-how,” former intelligence chief Hans-Georg Maassen told a conference in April.

Germany and its European neighbors aren't the only places China is seeking to improve ties.

While trade between the U.S. and Latin America has doubled since 2000, China’s trade with the region multiplied 22 times, OECD economist Angel Melguzio highlighted last year. China also lends the region a lot of money — around $30 billion in 2015, up from $231 million in 2005. And the funds largely come with no strings attached.

China is Africa’s largest trading partner and the country opened its first military base on the continent last year in Djibouti.

And Pakistan is banking on receiving more than $50 billion in Chinese loans and grants in relation to the Belt and Road Initiative. A senior Pakistani diplomat last year also confirmed to NBC News that his country invited China to build a naval facility on its territory in 2011.