The new Green Party male co-leader is James Shaw, replacing Russel Norman.
The first-term MP was elected at the party's annual general meeting in Auckland.
He was one of four contenders for the position, edging out experienced MP Kevin Hague.
Green Party MP Kevin Hague said he was deeply disappointed to have lost the co-leadership contest by just 13 votes at the party's annual meeting in Auckland today.
He said he was upset, as he really wanted the role, but that he respected the decision made by party members and remained committed to the Greens.
Mr Shaw said some in the party would be disappointed with the result, but he was committed to earning their respect over the coming years.
He said he was a safe bet for the party, despite entering parliament last year, although he noted that his lack of Parliamentary experience made him a risky choice for members.
Mr Shaw said there was no need for a change in direction for the party.
Three-term MP Kevin Hague and newcomer James Shaw were believed to be the favourites to replace Dr Norman, and understood to be well ahead of the other two contenders, MP Gareth Hughes and party member Vernon Tava.
All four candidates had attended more than 40 meetings over the past five weeks to state their case.
Metiria Turei is the sole nomination to be re-elected as female co-leader.
She opened today's conference, telling members she felt a bit like the Bachelorette.
"Who will get the rose? It's really been a while - you might want to read never - that I've had four men chasing after me to be my partner."
Mrs Turei said the Greens could take credit for the Government lifting benefits in this month's Budget following its persistent campaigning on child poverty.
"After six years of denying that raising the income of the poorest families mattered, National was forced to move on child poverty in this year's Budget."
She said the theme of this year's meeting was "forward", which she said couldn't be more appropriate given that success and the leadership contest.
She said a new co-leader would give the party new ideas and strength to grow.
Votes were cast by the party's 133 electorate delegates using a preferential voting system.