The Greens will play a support role to the new Labour/NZ First coalition Government, and party leader James Shaw says it's the best position to be in.
They'll back the Government on confidence votes, giving it the majority it needs to rule, and they'll also be needed for it to pass legislation.
The Greens will have three ministers and an under-secretary, the first time that's happened in the 21 years they've been in Parliament.
Those ministers will be outside Cabinet, but they'll sit in on Cabinet discussions when they need to.
- NZ's new Government: NZ First chooses Labour
- Full video: NZ First leader Winston Peters announces next Government
- NZ's next Prime Minister Jacinda Ardern addresses nation
The agreement was overwhelmingly approved by the Greens' delegates in a teleconference on Thursday night, with just three dissenting views out of 150.
Ms Shaw said there have been some valid concerns, but after long conversations and debate about a range of issues a strong consensus was achieved.
He and his MPs heard the news that NZ First had chosen Labour over National at the same time as everyone else - when Winston Peters announced it at a Beehive press conference.
"We were elated - this is a historic moment for the Greens to enter into Government properly for the first time," Mr Shaw said.
"It's an extraordinary moment for us... the important thing is that we will have the ability to lead in the areas that most concern us."
Mr Shaw said the portfolios his MPs would get were outlined in the party's agreement with Labour, but he would give the next Prime Minister, Jacinda Ardern, the courtesy of announcing them.
"One of the fantastic things about this arrangement is that the government will be a truly MMP government," he said.
"A consensus of all three parties will be needed to pass legislation."
He expects he is likely to take on one of those portfolios.
Mr Shaw said the Greens fought the election campaign on making New Zealand a world leader in the fight against climate change, restoring and replenishing forests and rivers, and ending poverty in New Zealand.
"We now have the opportunity to do that," he said.
Mr Peters said NZ First chose Labour because New Zealand needed change to face the future with confidence.
"The people want change, and it's going to happen," he said. "The blunt reality is that far too many people are doing without."