This points to possible frustration with the leadership of Chancellor Angela Merkel within the ranks of her conservative Christian Democrats (CDU) and their Bavarian-based allies, the Christian Social Union (CSU).

The CDU-CSU and the junior member of the Merkel-led coalition, Steinmeier’s centre-left Social Democrats (SPD), had a combined convention vote of 923 national and state lawmakers in the assembly, which has a total of 1,260 members.

Members of the pro-business Free Democrats (FDP) and the environmentalist Greens were also expected to support Steinmeier, bringing the expected vote for the former foreign minister to over 1,000.

A candidate needed to secure 631 convention votes to win.

“We live in turbulent times; people are uncertain,” Mr. Steinmeier said in his acceptance speech.

But he said that Germans should take a sense of pride from their nation having become “an anchor of hope for many in the world.”

Mr. Steinmeier will next month replace Joachim Gauck, a 77-year-old former East German pastor and human rights activist, who steps down next month as head of state at the end of his five-year term.

First convened in 1949, the convention draws its members from the world of German entertainment, sport and culture.

This year it included the trainer of the nation’s football team, Joachim Loew, drag queen Olivia Jones and Semiya Simsek Demirtas, whose father was the first victim of an alleged neo-Nazi terrorist group, the National Socialist.