Labour leader Jacinda Ardern will be Prime Minister in a remarkable chapter in New Zealand's political history - but the price of that will be wrestling a government that includes NZ First and the Greens.
Ardern's Labour Party was chosen by NZ First leader Winston Peters over National after almost two weeks of negotiations.
READ MORE: Peters adds another intriguing chapter to remarkable career
It will give NZ First four ministerial posts in Cabinet and an under-secretary post. Peters has been offered Deputy Prime Minister, but is yet to decide whether to take it.
The Greens will not be part of the formal coalition, but will provide confidence and supply and get three ministerial posts outside Cabinet.
READ MORE: English takes hard road back to Opposition
Ardern said she was "overwhelmingly humbled" to learn she would be Prime Minister.
Congratulations were quick to flow from overseas - including a phone call from Australia's Prime Minister Malcolm Turnbull, a close friend to former PM John Key.
Turnbull tweeted: "Congratulations @jacindaardern good to talk with you tonight, Look fwd to seeing you soon & building on out two nations' great partnership."
Congratulations @jacindaardern good to talk with you tonight. Look fwd to seeing you soon & building on our two nations' great partnership.
— Malcolm Turnbull (@TurnbullMalcolm) October 19, 2017
Peters' choice deprived National of the fourth term it had been so close to getting and delivering Labour the government benches after nine years in Opposition.
It was a remarkable turnaround - Ardern had taken over as leader less than two months before the election when its polling was in the low 20s - something Peters acknowledged as showing her mettle and readiness to be Prime Minister.
Ardern said the negotiations had been "robust" but she believed NZ First and the Greens would be "true allies" in achieving what Labour's own goals were.
"Labour has always believed that governments should be a partner in ensuring an economy that works and delivers for all New Zealanders. We also believe in a government that looks after its environment and ultimately looks after its people. I believe Labour has found true allies in Parliament to deliver on that."
The change in government will mean significant changes in some areas - Labour campaigned on housing, poverty, reducing immigration and on the environment.
Ardern also acknowledged English. "I have always believed members of Parliament come to this place in order to do good and serve their country as best they can. Mr English is an absolute example of that and I want to acknowledge it."
Peters had not told either Ardern or English ahead of his public announcement although it is likely news had slipped back to her.
The full detail of the deals is still being negotiated - Ardern said that would happen by early next week and ministerial portfolios announced and ministers sworn in by the end of the week.
She would not say what Labour had to concede of its own policies to secure the support of NZ First and the Greens - including issues such as the water tax.
She said the detailed work on the policy promises was still under way and it was not yet known whether it breached any of Labour's fiscal responsibility commitments - but it had been high in their minds during negotiations.
"I feel extraordinarily honoured and privileged to be in a position to form a Government with Labour at the lead," Ardern said.
She opened her first press conference as prime minister-elect by acknowledging her predecessor in the role, National leader Bill English.
"I want to thank Bill English for the role he has played in this campaign but also as prime minister and as serving in the past as NZ's finance minister," she said.
"Mr English has already called me this evening and acknowledged that negotiations for the National Party have now concluded."
Peters said the decision had not been easy and in some ways it had been "sad" to reject National. However, he said NZ First's priorities were economic reform, issues such as foreign land buyers, immigration and regional development.
"Far too many New Zealanders have come to view today's capitalism, not as their friend, but as their foe. And they are not all wrong.
That is why we believe that capitalism must regain its human face. That perception has influenced our negotiations.
"We've had to make a choice, whether it was with either National or Labour, for a modified status quo, or for change."
That decision brought disappointment for National leader Bill English who said Ardern's progress to Prime Minister was remarkable "given just 10 weeks ago she was deputy leader of a fading Opposition".
English was flanked by wife Mary and senior ministers who now face the move out of the Beehive and back to a normal MPs salary.
Take your Radio, Podcasts and Music with you