Chancellor Olaf Scholz’s Social Democrats scored record-low votes in the first major electoral test he has faced since taking office.BERLIN — Chancellor Olaf Scholz’s Social Democrats, in a regional election overshadowed by the war in Ukraine, scored record-low vote percentages on Sunday as Germany’s most populous state went to the polls.The contest involved only legislative seats in the state of North Rhine-Westphalia. But with the campaign’s start coinciding with the Russian invasion, the race was unusually dominated by national issues — in particular, the risks that the European land war might spread and the worry about energy supplies.Mr. Scholz has been increasingly criticized as dithering in his approach to supporting Ukraine in the war, which has become a popular cause in Germany across several parties, and his party appears to have paid a price in the first major electoral test it has faced since taking power less than six months ago.Projections showed the incumbent Christian Conservatives easing to a win and likely the governorship as the head of a coalition government. They were expected to take close to 36 percent of the vote versus less than 27 percent for the Social Democrats and 18 percent for the Greens.“It’s a huge disappointment for the S.P.D.,” said one political scientist, Uwe Jun of Trier University.“Given these results,” he said, “the S.P.D. must realize that it is obviously not perceived as the driving force of the federal government, but that it seems to be playing more of a supporting role in the coalition at the moment.”Just days after Russia invaded on Feb. 24, Mr. Scholz addressed the German federal Parliament and promised an epochal change, and signaled more spending on the Germany military. But since then the chancellor has struck many people as dragging his heels on policies that would actually help Ukraine.Supporters of the Christian Democrats after hearing the initial exit poll results on Sunday.Sascha Schuermann/Getty ImagesThere were weeks of debates on whether the German government would allow the export of heavy weapons before the Defense Ministry finally announced the shipment of dozens of armored air-defense systems.Germany was also seen as wavering on punishing Russia over the invasion. Fellow members of the European Union said Germany was trying to block decisions to boycott Russian energy imports, on which Germans are heavily dependent.Mr. Scholz was also criticized for sending his foreign minister on a state visit to Kyiv, the Ukrainian capital, instead of going himself.A recent poll found that nearly two-thirds of Germans do not consider Mr. Scholz a strong leader, and from respected broadsheets to Germany’s noisy tabloid Bild, commentators took the result of Sunday’s election as a damning verdict on Mr. Scholz’s first six months in office. A headline in the Süddeutsche Zeitung called the outcome “a vote of no confidence against the chancellor,” while Bild called it “a historic slap.”Voter unease seems not to have hurt one of Mr. Scholz’s coalition partners, the Greens. On Sunday, they were the big winners in terms of numbers gained over the last election, bettering their performance in 2017 by nearly 12 percentage points. Mr. Scholz’s two most popular ministers are Green party members who appear to be pushing for much of the popular Ukraine policy within the government coalition. One of them, Foreign Minister Annalena Baerbock, traveled to Kyiv last week.The Free Democratic Party, the third coalition partner in the federal government, did not do well at the polls, claiming less than 6 percent of the state’s votes.At 56 percent, voter participation was unusually low for a state election in Germany.“It’s a test of people’s mood, which just shows what people think about the government’s work at the moment,” said Professor Jun.Voters handed the Christian Democratic Union, which lost the federal election after Chancellor Angela Merkel retired, an important win. It keeps conservatives in power in the industrial west, the former heartland of the Social Democrats, but it could signal a changing tide as voters go to polls in several other big state elections in the coming years.“The C.D.U. is back, our forward-looking course has been vindicated,” the party leader, Friedrich Merz, said on Twitter.The Social Democratic leader in North Rhine-Westphalia, Thomas Kutschaty, on Sunday.Ina Fassbender/Agence France-Presse — Getty ImagesThe election does not directly affect federal politics in Berlin, where Mr. Scholz has been running the three-party coalition since December. But the support for the conservative government in the big western state adds to Mr. Scholz’s woes trying to keep his government stable and the Social Democratic brand strong.Russia-Ukraine War: Key DevelopmentsCard 1 of 3Inching closer to NATO. More