New Zealand's next government has been agreed after the Greens voted to join Labour, accepting Prime Minister Jacinda Ardern's "cooperation agreement" between the two parties.
Ms Ardern will lead a Cabinet consisting entirely of Labour MPs after winning re-election a fortnight ago in in the October 17 poll.
In keeping with her consensus-seeking style, tMs Ardern held talks with the Greens - a government partner during her first term - over the last fortnight.
She decided to offer the left-wingers the chance to continue their alliance for the next three years.
"On election night I said that I wanted to govern for all New Zealanders and to reach as wide a consensus on key issues as possible. This agreement does that," she said.
"This arrangement allows us to have both the benefit of continuing with a strong mandate and delivering all those things that we campaigned on while also using the skills and expertise that exists in the Green Party."
Three hours after Ms Ardern unveiled the deal, the Greens ratified the agreement in a marathon teleconference of grassroots members.
According to reports, 85 per cent of delegates signed off on the deal, just north of the 75 per cent threshold.
Coalitions and governing deals between parties are commonplace in New Zealand, which in 1996 changed electoral systems to give minor parties a bigger role.
This deal falls short of a formal coalition, and is being termed a "cooperation agreement" by Labour.
The 42-point agreement gives the Greens co-leaders each a ministry outside cabinet.
James Shaw will return as climate change minister, with Ms Ardern saying he knows the issue "inside out", and adds associate minister responsibilities for biodiversity.
Marama Davidson, who has never held executive office, will become family violence minister, a newly-created role, and associate minister for housing focused on homelessness.
The parties have also agreed to work together on climate change, environment, child wellbeing and "marginalised communities".
The deal does not bind the Greens from speaking out against government policies they disagree with.
Ms Davidson said her party, which also increased its vote share at the election, was "thrilled" to sign on for another three years in government.
"New Zealanders voted us in to be a productive partner to Labour to ensure we go further and faster on the issues that matter. We will make sure that happens this term," she said.
Ms Ardern will announce her full second-term ministry on Monday, and meet for the first time as a cabinet on Friday after the confirmation of the final results from the Electoral Commission.