New Zealand opposition leader Andrew Little has quit and been replaced by his 37-year-old deputy seven weeks before the general election, as the Labour Party tried to find a way to overcome recent dismal polling.
Supporters hope Jacinda Ardern will bring more charisma to the role and forge a stronger connection with younger voters.
But she faces a tough battle to unseat Prime Minister Bill English, whose conservative National Party has won the previous three elections and held power for nine years.
"Everyone knows that I have just accepted, with short notice, the worst job in politics," Ms Ardern said.
"There is no doubt that being in opposition is hard. That's why I'm using the next eight weeks to get our team out of it."
As recently as a few days ago, few people predicted Mr Little would quit despite the party's struggle to gain traction with voters.
Indeed, the party's campaign hoardings and leaflets featuring Mr Little had already been printed.
But a recent survey of voters showed the Labour Party was polling just 24%. Mr Little then told TV 1 News he had talked to colleagues about the possibility of quitting, an admission that appeared to erode his leadership further.
He said he had decided to step down because the polling results were building a narrative that was getting in the way of the party's important messages.
"I take responsibility for that and it is my judgment that the party and the people who we are campaigning for will be better served by a new leader who can bring a fresh face and a fresh voice to this vital campaign," he said.
Ms Ardern said the situation was "not what anyone expected or wanted" but that her team was about to "run the campaign of our lives".
She said she would take the next three days to review the campaign and make any new policy announcements. She said her vision for New Zealand was a place where everyone had a roof over their heads, meaningful work and where education was free.
Ms Ardern has a background in policy development and is the former president of the International Union of Socialist Youth. She was first elected to Parliament in 2008.
Labour also chose as its new deputy Kelvin Davis, a former school principal and an indigenous Maori who is the party's spokesman for Maori development.
Although Mr Little quit as Labour leader, he remains a member of the Parliament. Ms Ardern said she would consider him for a senior role if she wins the election.
Under New Zealand's proportional voting system, parties typically must form alliances to govern.
Labour's most likely path to power is by forming alliances with the liberal Green Party and the New Zealand First party, which wants to limit immigration.
The National Party is seeking to retain its alliances with several small parties. But it may also vie for the support of New Zealand First, depending on the final vote tallies.
New Zealand First has not indicated which of the two main parties it will back.