BERLIN—The Nord Stream pipeline that channels Russian natural gas to Europe shut down for a scheduled maintenance on Monday, stoking fears across the continent that the Kremlin could end supplies in retaliation for sanctions against its invasion of Ukraine.

The pipeline connecting Russia’s Siberian gas fields with Germany under the Baltic Sea will remain closed for annual maintenance until July 21, the consortium behind the pipeline, which is majority-owned by Russia’s energy giant PAO Gazprom, said.

While the shutdown happens every year, European politicians including Germany’s energy minister Robert Habeck and French Finance Minister Bruno Le Maire warned on Sunday that Vladimir Putin’s regime could use the maintenance to stop gas supplies, and called on industry and households to prepare for gas shortages.

Gas prices have been surging across Europe and particularly in Germany, where some regions have already begun rationing hot water, restricting energy usage for street lighting and announced they would lower heating temperatures for the cold season.

An end to Russian gas supplies would trigger a gas shortage and cause social tensions that could only be kept in check by government subsidies and other interventions in the market, Mr. Habeck said in a radio interview Sunday.

Mr. Habeck said that households would need to cut their energy consumption by about a fifth for the country to get through the cold season without shutting down factories.

Germans are increasingly buying electric and oil-powered heating systems, as well as wood-burning stoves, according to retailers.

Gas flows channeled through the twin pipes of Nord Stream were reduced to 40% of their normal capacity in June, which Nord Stream blamed on technical problems caused by the absence of a turbine that was due for repairs but had been held in Canada due to export sanctions against Russia.

Canada’s government announced last week that it had made an exception for the turbine at the behest of the German government and would allow the equipment to be delivered to Germany, which will then transfer it to Russia.

“We welcome the decision of our Canadian friends and allies,” Germany’s Chancellor Olaf Scholz said in a statement.

The move triggered criticism from Kyiv, which warned that carving out exceptions to the sanctions was a concession to Moscow.

“This dangerous precedent violates international solidarity, goes against the principle of the rule of law and will have only one consequence: it will strengthen Moscow’s sense of impunity,” Ukraine’s foreign ministry said in a statement.

Russia is still exporting gas to Europe through a pipeline traversing Ukraine, which has remained operational, albeit at a lowered capacity, despite the invasion that started on February 21.