Germany’s Social Democrats (SPD) have voted overwhelmingly for former European parliament president Martin Schulz to become the party’s new head and the main challenger to Angela Merkel in September’s general election.

Schulz, 61, who has emerged in recent weeks as Germany’s version of the US democrat Bernie Sanders, earning support in particular among young voters who have dubbed him the SPD’s “fresh wind”, secured all 605 votes at a special party conference in Berlin on Sunday, a record result beating even Kurt Schumacher, the party’s popular postwar leader, who secured 99.71% of the vote in 1948.

Commentators predicted Schulz could become the most popular social democrat since the cold war-era chancellor Willy Brandt.

Schulz, who apart from serving as a provincial mayor for several years has not held a high-profile political post in Germany but instead has made his career in European politics, called the result the “prelude to conquest of the chancellory”.

“This is an overwhelming moment for me and for us all,” Schulz told the meeting. Shortly afterwards the strains of Louis Armstrong’s It’s a Wonderful World filled the conference hall.

On Sunday, a poll showed a left-leaning alliance led by the SPD would potentially have enough support to oust Merkel from power in crucial parliamentary elections, expected to be held on 24 September.

Merkel’s CDU/CSU conservative alliance has 33% support, with the SPD on 32%. If the SPD were to join forces with the far-left Die Linke, which has 8%, and the Greens, also on 8%, it would have enough to form a coalition government.

In a speech to party members, a jubilant Schulz, who wiped away tears, pledged to support the working man and woman, and to ensure social justice for all, from the nursery to retirement.

The outgoing SPD leader, Sigmar Gabriel (left), with Schulz at the party conference. Photograph: Axel Schmidt/Reuters

He sharply attacked the rightwing populist Alternative für Deutschland (AfD), currently on 8% in the polls, compared the far-right protest group Pegida to supporters of Donald Trump, and criticised a conservative re-election pledge to reduce taxes as sending out a wrong signal.

Schulz also repeated his vow to undo some of the radical labour market changes introduced by Gerhard Schröder, the last SPD chancellor, which have been seen as the main reason for the party’s chronic poor standing in the polls.

The SPD has for years trailed the CDU/CSU, but its support surged in January when Schulz announced his intention to stand for party leader, and Sigmar Gabriel, its leader for the past seven and a half years, agreed to step down. The party’s poll ratings have since risen by about 10% and it has enjoyed a significant increase in card-carrying members, after years of losses.

Merkel’s conservatives have been in power under her since 2005. The CDU/CSU formed a coalition with the SPD for the first term, then joined up with the pro-business Free Democrats for the second, and in 2013 teamed up once again with the SPD.

Since Schulz arrived on the scene, the SPD is feeling its first chance for years to wrest back power is finally in sight.

Merkel remains the most popular choice for chancellor, however, with 46% of voters saying they would choose her in a direct vote, against 38% for Schulz. But with six months to go, and observers saying voters’ weariness towards Merkel could grow in that time, the “Schulz effekt” might yet make its impact felt far more than would have been thought possible even a few weeks ago.

Sanders is seen as something of a role model for Schulz, with young Germans in particular becoming newly politicised following the Brexit vote and Donald Trump’s election. Schulz rallies typically attract hundreds of young people, many of whom are keen to take selfies with the former bookshop owner and reformed alcoholic.

Gabriel, who recently became Germany’s foreign minister, called Schulz’s arrival “the most joyful and optimistic transfer to a new leader that this party has experienced in decades”. He added, for his part, “there is no reason for melancholy”.