BERLIN— Friedrich Merz is expected to be the clear winner of the German election. The question now for the conservative leader is how fast and with whom he can cobble together a government—and whether the U.S. will seek to influence the process.

Despite a historically strong showing by antiestablishment nationalists in a ballot that extended Europe’s recent lurch to the right, Merz’s Christian Democratic Union was on track to win the vote by a comfortable margin, according to early exit polls.

The results, if confirmed, mean Merz would start talks on forming a government this week and is likely to become Germany’s next chancellor and a central interlocutor for President Trump in Europe—but the way there could be rocky.

Initial projections by public broadcaster ARD gave the CDU and its CSU sister party in Bavaria a joint 29% of the votes, followed by the far-right Alternative for Germany, or AfD, with 19.6%. Chancellor Olaf Scholz’s Social Democratic Party looked to have scored 16%, its worst score since the late 19th century.

Voters elected a fragmented parliament, with at least five parties likely to make it into the house and two others just below the 5% threshold needed to secure representation. The more parties that make it in, the harder it would be for Merz to secure a coherent alliance with a solid majority of seats.

Facing strong economic and geopolitical headwinds, Europe is under pressure to quickly coordinate a response to Trump’s tariff threats and his plans to quickly end the war in Ukraine on terms that many European capitals fear could be unacceptably generous to Moscow and undermine their own security.

France and Germany have been hamstrung in recent months after their respective governments lost their parliamentary majorities. Merz’s election as chancellor would mark a first step toward Europe rebuilding its leadership.

Merz faces the daunting task of turning around a German economy that has barely grown since before the Covid-19 pandemic and is likely to shrink this year for the third time in a row. He has pledged to cut immigration sharply in a bid to weaken the AfD.

Further ahead, he and his counterparts in France, the U.K., Poland and elsewhere will have to decide whether and how to redraw the contours of the Western alliance given an increasingly antagonistic U.S. that is moving closer to Russia.

In a television interview last week, Merz said Germany should start discussing with France and the U.K. how their respective nuclear deterrents might be extended to cover Germany should the U.S. reduce its security presence on the continent.

CDU officials said Merz would appoint a small team of negotiators to start sounding out potential ruling partners as early as this week, with a view to agreeing on a coalition within two to four weeks, much faster than the traditional two-to-three months.

The U.S. administration has hinted it wanted whoever wins the election to bring the AfD in as a ruling partner. Elon Musk , who advises Trump, has urged German voters to vote for the far-right party . Last week, Vice President JD Vance suggested that the U.S. might withdraw its military presence in Germany if the country didn’t change its speech laws, an AfD position.

Initial results showed the AfD had fallen just short of recent opinion polls but was still poised to achieve its biggest score at a national election since its creation in 2013, almost double its 2021 score.

Pollsters attributed the AfD’s gains to several factors, such as the outgoing government’s deep unpopularity, Germany’s second yearly recession in a row, high levels of immigration, voter fatigue about a costly green transition, and violent crimes by refugees and asylum seekers in recent months.

The CDU has benefited from much the same trends, and parts of the two parties’ programs overlap—especially on immigration and the economy. However some AfD positions—including its call for Germany to exit from the European Union, lift sanctions on Russia and tone down its culture of Holocaust remembrance—are anathema to Merz’s conservatives.

On paper, CDU and AfD would have a crushing majority in parliament. But Merz has said he would under no circumstance form a ruling alliance with the AfD. “I’m not letting an American vice president tell me with whom I should be talking to in Germany,” he told a TV debate a week ago.

“Friedrich Merz would be loath to work with the AfD,” said Sudha David-Wilp , vice president of external affairs at the German Marshall Fund of the United States. “Pressure from the U.S. administration is unlikely to sway him,” she said, adding that a successful immigration crackdown could help Merz ward off such pressure.

Merz is likely to initially sound out the center-left SPD. Polls taken before the election showed a CDU-SPD coalition was voters’ favored government. Whether such an alliance has enough seats to govern or needs the support of another party might depend on the final results, which are expected on Monday.

Merz has campaigned on deregulation and business and income-tax cuts, as well as the closure of land borders to most undocumented immigrants. All are measures he might struggle to agree on with the more left-leaning SPD.

Some analysts say a CDU-SPD coalition might not only take a long time to negotiate but could also end up being as fractious and ineffective as Scholz’s three-way alliance by the time it collapsed in November. The SPD has swung more to the left during the campaign and accused Merz of parroting AfD policies, complicating a potential post-ballot rapprochement.