Germany’s Greens are expected to be a critical part of any new government. But these are not the Greens of old. Today it is a pragmatic party promising an assertive stance abroad.

Whatever government fills the vacuum in Germany after Chancellor Angela Merkel will be tinged with green.

After nearly 16 years in office, Ms. Merkel’s conservative party, the Christian Democrats, is slipping and stagnant, critics say — short of ideas on how to keep Germany vibrant and rich in a world where its industrial and export model is outdated; where faith in the United States has been damaged; and where China is more self-sufficient and Russia more aggressive.

The other traditional mainstay, the left-center Social Democrats, currently junior partners with Ms. Merkel, is in even worse shape, both electorally and ideologically.

The German Greens are filling the vacuum. Five months before elections in September, the party is running a close second in the opinion polls to the struggling Christian Democrats, and some think it might even lead the next government.

“They will be part of the next government,’’ said Norbert Röttgen, a prominent Christian Democrat, in a forecast widely shared in Germany. “Either a big part or even the leading part.’’

But these are not the Greens of the Cold War, a radical party appalled by the nuclear standoff between the Soviet Union and the United States over a divided Europe. The Greens are now centrist, eager for power, with a surprisingly gimlet-eyed view of international affairs and of how Germany needs to change without alienating big business.

If the Greens surge in Europe’s largest and richest country, it would be a watershed not only for the party but for all of Europe, where it already is part of the governing coalitions in six countries.

It would also potentially herald a shift toward a more assertive foreign policy in Germany, especially toward China and Russia, as global politics is becoming a competition between authoritarian and democratic ideals.

Chancellor Angela Merkel of Germany leaving Parliament in Berlin last month.
Markus Schreiber/Associated Press

“This is a different party, a different generation, a different setting and a different world,” said Sergey Lagodinsky, a Green member of the European Parliament. “With Covid, climate and common global challenges clearer to many, it’s easier to push for a transformative green agenda in the classic sense.”

“But the confrontation with authoritarianism is now clear,” he added, “and that puts us in a different place.”

Jana Puglierin, the director of the European Council on Foreign Relations in Berlin, said: “The Greens are the only party that can rock the boat a bit, especially on China and Russia. They will strike a better balance between the economy and human rights.’’

Led by two pragmatists, or “realos,” the German Greens honor their “fundis,” the more idealistic among them, without allowing them to marginalize the party, as in the past.

The party’s co-chairs are Robert Habeck, 51, and Annalena Baerbock, 40, who is considered the most likely chancellor candidate. The choice is expected on Monday; she would be the only woman in the race to replace Ms. Merkel.

With the environment central to their program, the Greens represent the current zeitgeist. Its leaders argue that correct economic policies can produce a Germany that is digital, modern and carbon neutral, no longer so dependent on old-fashioned industrial production, however sophisticated.

They oppose Nord Stream 2, the Russian natural-gas pipeline to Germany that circumvents Ukraine and Poland. They also oppose the European Union’s investment deal with China. They are committed to European cooperation, democracy promotion, the defense of human rights, Germany’s membership in NATO and its strong alliance with the United States.

Lena Mucha for The New York Times

While the Greens consider NATO’s goal of military spending of 2 percent of gross domestic product to be arbitrary, the party favors more spending to ensure that the woefully weak German military is able to meet its NATO responsibilities.

Even Mr. Röttgen, the Christian Democrat who is chairman of the Bundestag foreign policy committee, said that “however embarrassing for me, the Greens have the clearest stance of all the parties on China and Russia.”

They would make “a much more realistic and preferable partner for us on foreign policy,” he said.

Wolfgang Streeck, a leftist German economist, once famously called the Greens “the vegetarian section of the Christian Democrats,” noted Hans Kundnani of Chatham House, a research organization based in London. In the way the party criticizes Russia and China on the grounds of democracy and human rights, Mr. Kundnani said, it is similar to American neoconservatives.

“The German Greens are now a pragmatist centrist party,” said Ulrich Speck of the German Marshall Fund in Berlin. “They want to be part of the government and play a big role, with a focus on greening the economy. They think there are enough in business who understand that this is the future.”

Foreign policy is secondary, Mr. Speck said. “But the democracy agenda matters, and they position themselves in solidarity with opposition democrats in Belarus, Ukraine, Russia and China. And they are very tough on China.”

Clemens Bilan/EPA, via Shutterstock

In Germany, the Greens are already part of governing coalitions with a variety of other parties in 11 of the 16 German states, and were just re-elected to head the government in Baden-Württemberg, where the car industry is important.

In fact, argued Arne Jungjohann, a political analyst with Heinrich Böll Foundation, the Greens are flexible enough to go into coalition with any party, except the far-right Alternative for Germany.

In Britain and Western European countries like France, the Greens are more modest and leftist, committed to the environment. But even there, they are benefiting from the weakness of more established parties.

In six countries, Mr. Jungjohann said, they are already in government. They are part of the governing coalitions in Austria, Belgium, Finland, Ireland, Luxembourg and Sweden.

In Europe’s south and in post-Communist Europe, as in the east of Germany itself, the Greens are not such a big factor, though they are more popular with the urban young.

One of Germany’s main problems is that its successful economic model has become a trap, argued John Kornblum, a former American ambassador to Germany who still lives there.

“They haven’t done very well with digital, but found a market in China for their 19th-century products,” he said. “The Chinese at this point still need them and buy them, but at some point soon China will make all that themselves.”

The other establishment parties “believe that Germany’s existence depends on this 19th-century machine-tool economy,” he said.

Alone among the main parties, the Greens have a vision for a Germany that is digital, climate neutral, deeply committed to the European Union, to democratic values and gender equality. A party that, as Ms. Puglierin said, believes that the future is no longer the diesel Mercedes but the electric Tesla.

Michael Probst/Associated Press

Still, the party has had to dance carefully over issues of the military, security and nuclear policy, where idealism confronts the world as it is, and where soft power is not always matched with hard power.

“A test will come, because the reality of foreign policy is not just value-driven, but you need to define your interests,’’ Mr. Lagodinsky said.

True to its roots, the party calls for a Germany without U.S. nuclear weapons. But it has also been careful to hedge its election manifesto.

“They want a world without nuclear weapons, but acknowledge that it will take time to get there — they’ll first have to find other ways to reassure eastern and central European partners,” said Sophia Besch, an analyst with the Center for European Reform in Berlin.

They want close cooperation with France on Europe but are less enamored of French ideas for a European army; are ambivalent about a new European air combat system that could carry nuclear bombs and armed drones; and would be strict about exports of arms to customers like Saudi Arabia.

They would also be strict about how and when German forces could engage overseas, even in coalitions of the willing, in the absence of a United Nations Security Council resolution.

But what may be most important for Germany, Ms. Puglierin noted, is that the Greens would at least produce new, needed debates on long-suppressed topics, like the ambivalent German policies toward China and Russia, let alone German dependency on the combustion engine.

“The Greens are the only chance to see real change in German foreign policy,” she said. “We’ve been so status-quo oriented in the Merkel years.”