German Economic Affairs Minister Robert Habeck warned in an interview published on Saturday of "severe consequences" for the Nord Stream 2 gas pipeline from Russia to Germany if Moscow attacked Ukraine.
The Baltic Sea pipeline is set to double supplies of cheap natural gas from Russia to Germany, which the European Union's top economy says is needed to help it transition from coal and nuclear energy.
But the 10-billion-euro ($12 billion) project has for years been dogged by delays and drawn fierce criticism from Germany's eastern EU allies like Poland and from the United States.
Critics say the project will increase Europe's dependence on Russian gas and Ukraine has described it as a "geopolitical weapon."
"Any new military action cannot remain without severe consequences," the Green minister told the Frankfurter Allgemeine Zeitung, a Sunday weekly, referring to a Russian troop deployment on the Ukraine border.
He warned that "nothing can be excluded" if "there is a new violation of the territorial integrity" of Ukraine.
The new German government threatened to block the pipeline from operating if Russia invades Ukraine.
"In the event of further escalation this gas pipeline could not come into service," Foreign Minister Annalena Baerbock said.
Habeck said: "From a geopolitical point of view, the pipeline is a mistake," adding: "All the countries were against it except Germany and Austria."
He added: "The pipeline has however been built. And the question of it being put into service remains open and must be decided according to European and German law."
German authorities are waiting for the pipeline's Swiss-based "Nord Stream 2 AG" operating company to submit documents to restart the certification process.
The pipeline would then also have to be approved by the European Commission — a process not likely to be completed in the first half of next year.