BERLIN — When Germany and China launched their government consultations a decade ago, Angela Merkel was still chancellor and their relations seemed an endless opportunity for trade and profit. The dialogues were a time for pomp and circumstance, trade deals and signing ceremonies, red carpets and military salutes.

But on Tuesday, Germany’s chancellor, Olaf Scholz, and China’s premier, Li Qiang, will relaunch the consultations after a three-year hiatus during the pandemic in a very different world — one with new calculations over political vulnerabilities and economic dependencies.

The two countries return to the talks nearly as estranged partners, their relations strained by Russia’s war in Ukraine, Beijing’s deepening courtship with Moscow and China’s simmering tensions with the United States, Germany’s most important ally.

“These consultations seem out of sync with the times,” said Thorsten Benner, director of the Global Public Policy Institute in Berlin. “Government-to-government consultations are usually something you would do with your democratic allies. The challenge is to balance the new realism we are facing with the old, Merkel-style of doing China consultations.”

These consultations will be the first for Mr. Scholz, as well as the first visit to Berlin for Mr. Li as premier, who will be accompanied by a large train of ministers. There is little doubt their missions will be at odds, even as they try to shape areas of common interest.

For Germany, the meeting will be an opportunity to assert a new stance, one in which China is still one of its most critical economic partners but also a “systemic rival.” That means Berlin will try to shield its critical technologies and encourage its businesses to diversify away from Beijing.

For China, it will be an opportunity to convince its largest European trading partner to stick to business as usual — and drive a wedge between Berlin and Washington.

How to maintain necessary economic ties with China, in the shadow of growing U.S. pressure to align with it against Beijing, is a balancing act Germany is still struggling to master.

One German official privately called it Berlin’s “three-body problem.” Keenly aware that Washington is its security guarantor, German officials no longer have the luxury of treating its economic and political interests separately.

Relationships it once treated as bilateral and distinct — German-Chinese, German-American and American-Chinese — now feel tangled together. Security concerns have also intruded on economic ambitions in ways that did not preoccupy Germany before.

Russia’s invasion of Ukraine forced Germany to reconsider economic relationships it had taken for granted, like its dependency on cheap gas from Russian, which once provided 50 percent of its supply. Germany managed to pivot to other supplies, narrowly avoiding a severe energy crisis, though not a recession.

By comparison, an event like a Chinese attack on Taiwan that sets off a U.S.-Chinese military confrontation would be far more painful. German officials believe they would be compelled to get involved, after having pushed so hard for Asian nations to support Europe against Russia’s invasion of Ukraine as a violation of territorial sovereignty.

The economic consequences would be even more severe: More than a million German jobs depend directly on China, and many more indirectly. Nearly half of all European investments in China are from Germany, and almost half of German manufacturing businesses rely on China for some part of their supply chain.

For China, too, this is a trying moment.

Its post-pandemic economic recovery has been slower than expected. Some Western companies have also been wary of making new investments in China, as President Xi Jinping embarks on a push to fortify national security this year — including a broadening of counterespionage laws that has heightened police scrutiny of Western companies in China.

Relations with Germany are especially important: It is China’s largest European trading partner and source of European foreign investment.

“The fact that Germany has been talking about de-risking or becoming less dependent on the Chinese market naturally worries China,” said Hu Chunchun, an associate professor at Shanghai International Studies University.

During talks in Berlin, German officials will most likely offer China a sense of what is coming in their long awaited China strategy paper, which was delayed by months of internal wrangling within Germany’s government over how tough its stance should be. The paper is now expected to be made public in July.

A leaked original draft reflected a much tougher line on the need to diversify economic interests away from China, particularly in areas like critical infrastructure, as well as raw materials for technologies needed for a carbon-neutral economy, such as solar modules and electric car batteries.

That tone is expected to have been softened somewhat under pressure from Mr. Scholz, who is wary of too much shock to an economy that has dipped into recession.

German officials will make clear that they have no intention of changing their “One China” policy, acknowledging Beijing’s goal of unifying with Taiwan while maintaining “friendly, but unofficial” relations with the Taiwanese.

They will also underline a message Mr. Scholz has repeatedly stressed: that Germany has no plans to “decouple” from China, as U.S. officials once urged. But, rather, it will lean into the concept of “de-risking.”

The problem, analysts say, is defining what de-risking actually means.

“Does it mean getting rid of risk or minimizing it? How fast do you do it? There is a lot of leeway in that term,” said Mr. Benner. “Scholz is walking a fine line. He does ‘de-risking lite.’’ He is very big on diversification, but he doesn’t want to discourage investment.”

In April, Chinese officials raised concerns with Germany about news reports that said Berling was considering limiting the sale of chemicals used in semiconductors to Beijing. The U.S. has been seeking to enlist European and other allies in its push to block Beijing’s access to critical technologies like semiconductors, an effort that has infuriated China.

“They need to keep the Europeans as far away from the Americans as possible,” said Mikko Huotari, executive director of the Mercator Institute for China Studies, of the Chinese delegation’s goal this week. “Germany plays a huge role in that.”

Beijing is still banking on the fact that many European companies rely so heavily on Chinese consumers that they cannot afford to distance themselves from China, said Paul Haenle, a former director for China on the National Security Council in both the Bush and Obama administrations.

“Chinese leadership has calculated that Europe is still very much at play,” he said.

With Germany, in particular, China has cards to play: The biggest and most powerful German businesses — the chemical producer BASF, and automakers like Volkswagen — have bucked the trend of many other, increasingly wary German companies, and doubled down on their investments in China.

Late last year, China lifted its strict pandemic restrictions and reopened its economy, rolling out the red carpet to encourage foreign investors to pour money into China. Volkswagen’s chief executive, Oliver Blume, was one of the first multinational business leaders to visit China. The country is the automaker’s largest sales market.

“China feels that because of this dependency from a handful of big German companies, in the end, Germany will always be able to compromise or at least strike a deal with China,” said Philippe Le Corre, a senior fellow for the Asia Society Policy Institute’s Center for China Analysis.

Indeed, Germany’s biggest challenge may not be a reckoning with Beijing but with its own companies — and making clear that in the future, they must proceed in their economic dependencies on China at their own risk.

It makes the path for Germany to transform its relationship with China possible, but risky, the analyst Mr. Huotari said: “There is a way. Whether it is going to a painful one, we have to see.”

Erika Solomon reported from Berlin, and Nicole Hong from Seoul. Olivia Wang contributed reporting from Hong Kong.