Image copyright Getty Images

On Jacinda Ardern's first day as New Zealand's opposition Labour leader, she was thrown a question it's hard to believe is still being asked of politicians in 2017.

"A lot of women in New Zealand feel like they have to make a choice between having babies and having a career or continuing their career. So is that a decision you feel you have to make or that you feel you've already made?"

But in a way, that question from a TV talk show host was the best thing that could have happened to her that day.

In a world of instant outrage, the ensuing spat propelled the story of her promotion to front pages worldwide, raising her profile and burnishing the "outsider" status which fired up Labour's election campaign.

Now, after hard-fought coalition talks, she will be New Zealand's new prime minister - its youngest since 1856.

Media playback is unsupported on your device Media caption Jacinda Ardern: "I never intended for people to make judgements"

To the outside world, Ms Ardern appears to have come from nowhere in this election, but she's been rising through the Labour ranks since she first entered parliament in 2008, at the age of 28.

She has been involved in left-wing politics since her teens, working in the office of Helen Clark, New Zealand's last Labour prime minister, and spending time in the UK as policy adviser to Tony Blair.

Image copyright Getty Images Image caption Ms Ardern has a close relationship with Helen Clark, New Zealand's last Labour leader

She has talked about how growing up in Hamilton seeing "children without shoes on their feet or anything to eat for lunch" inspired her to enter politics. Tackling such inequality was a central part of her election campaign.

Speaking before election day, veteran political commentator Colin James, who has been observing her career since around that first election, told the BBC she always had "the substance and potential to go right to the top".

"A lot of people just saw a flighty young woman," he said of their first interactions. "But I saw an intelligent person who thought deeply about things."

Ms Ardern was brought up a Mormon - though left the faith over its opposition to same-sex marriage - which Mr James said gave her a "solidity".

Being 'exactly who I am'

Ms Ardern took over the Labour leadership on 31 July. Although she was a frontrunner, she said she had an hour's notice that Andrew Little was about to stand down, conceding he could not steer the party to election victory.

Image copyright Getty Images Image caption Andrew Little stepped down as Labour slipped to its lowest opinion poll ranking in years

"It wasn't a lot of time to prepare," she told New Zealand outlet Newshub. "But in a way it's meant that I had to run the campaign as myself, be exactly who I am, run a lot based on instinct."

That self-reliance kicked in with that baby question on day one. The response from the outspokenly feminist leader was not kneejerk anger, but nuance.

"I have no problem with you asking me that question because I have been very open about discussing that dilemma because I think probably lots of women face it," she told the host, Jesse Mulligan.

Her dilemma, she said, was no different from that faced by any New Zealand woman in the workplace.

But when the question became that day's talking point, overshadowing all other policy issues, a later interviewer implied it was reasonable for employers to want to know if their staff would be taking time off to have children.

Image copyright Getty Images Image caption Lizzie Marvelly (right) says her friend Jacinda Ardern handled the baby questioning 'deftly'

An agitated Ms Arden told Mark Richardson his view was "totally unacceptable in 2017", adding: "It is a woman's decision about when they choose to have children and it should not predetermine whether or not they are given a job or have job opportunities."

"I laughed so hard when she pointed her finger at Mark Richardson and shut him down so deftly," said Lizzie Marvelly, a columnist at the New Zealand Herald, editor of feminist blog site Villainesse.com and a close friend of Ms Ardern.

"I think she handled the questions as well as could be expected. Characteristically, she was open about her personal situation, as she'd chosen to speak about it previously, but defended the rights of other women - which are enshrined in law, I should add.

"I wouldn't have expected her to react any other way," said Ms Marvelly, speaking in September.

The anxiety of leadership

But as female leaders have found before, appearing tough and capable is not enough - you have to walk the tightrope of being seen to have emotions, but not be driven by them.

Ms Ardern seems not to have shied from that, openly crying at the opening of a memorial to suicide victims, and speaking frankly about her own struggles with anxiety.

Media playback is unsupported on your device Media caption How shoes are raising awareness of New Zealand suicides

"I'm constantly anxious about making mistakes," she told Next magazine in June this year, shortly after becoming deputy leader. "Everything in politics feels so fragile; just like that [clicks fingers] you could stumble and that's forever what you'll be known for."

Becoming party leader would just mean having "more people to let down", she said.

"I think to have a woman in such an important role speak openly about issues that many women face has been powerful," said Ms Marvelly.

"We have devastating problems with mental health in New Zealand, so having a politician be open about sometimes feeling vulnerable is both refreshing and, I think, helpful."

Colin James said he thought at the time of the interview that it was a mistake for someone even quietly holding out for the top job to be so open about their nerves.

Weeks later, she was opposition leader, leading him to ask: "Was it a mistake, or had she tapped in to something?"

Will the 'stardust' settle?

Jacinda Arden has been the politician it's been OK to find cool for some years now - she DJs, she swears in interviews, she goes to Pride marches, she dresses well. She's called herself an "acceptable nerd".

Under her leadership, Labour shot up from some of its lowest polling under Mr Little. Though they certainly experienced poll wobbles after the initial surge of "Jacindamania", they suddenly presented a genuine threat to the incumbent Nationals and Prime Minister Bill English.

There's no doubt, however, that she came across as the contender most lacking in experience.

Although she spoke forcefully on domestic issues, she had little to call on in terms of foreign policy experience bar her role as president of the International Union of Socialist Youth, a role which she has said brought her into contact with global leaders.

Image copyright Getty Images Image caption PM Bill English made his experience and proven expertise central to his re-election bid

In a Facebook Live interview with Newshub in September, she seemed to excel at the lighter questions about cereal bars and Taylor Swift, but had no solid response to tougher questions about the Rohingya crisis or whether New Zealand was committed to military action against Islamist militants.

Mr English, the former deputy prime minister and finance minister who took over the prime minister role in December, made her inexperience a key part of his re-election bid.

"We can continue with the policies that have delivered us one of the fastest-growing economies in the developed world, or we can experiment with the vague and confusing policies proposed by our political rivals," he said, dismissing his rival's rock star appeal.

"Now the stardust has settled, you're starting to see the policy," he said in a rowdy leaders' debate, where he attempted to list a raft of tax increases he said Labour wanted to bring in.

"This stardust won't settle, because none of us should settle," Ms Ardern bit back.

Ultimately, though, Labour did not win a majority in 23 September's election. No party did, and for the third time in three decades, the future of the government rested with the populist New Zealand First party.

At 72, leader Winston Peters is almost twice Ms Ardern's age. He has been an MP since before she was born. He said he believed his party and Labour in coalition would be the best choice to help capitalism "regain its responsible, its human face".

Ms Ardern, in turn has said Labour "will work hard to ensure New Zealand is once again a world leader, a country we can all be proud of".

"We said we could do this, we will do this."