Chlöe Swarbrick, who ran for Auckland Mayoralty in 2016, has lost her bid to stand for the Green Party in Auckland Central.
But it's certainly not over for Ms Swarbrick yet - party co-leader James Shaw says she will stand in another Auckland seat.
Ms Swarbrick was up against Denise Roche, who has been a Green Party list MP since 2011.
Green Party members voted in Ms Roche at a meeting on Monday evening.
Ms Roche said Auckland Central is critical to the party vote for the Greens.
The Green Party have won just one electoral seat in their history - Jeannette Fitzsimmons in the Coromandel in 1999. Instead, the party focuses on growing the party vote.
Auckland Central is an electorate the Greens are popular in. They took 22.17 percent of the party vote in the urban electorate in 2014 - more than double their national average.
"I want to thank and congratulate Chlöe for her spirited campaign. She's going to be a huge asset for the Green Party this year, and into the future," said Ms Roche in a press release.
Ms Roche has spent 16 years working as a union official. She lives on Waiheke, where she served on the local board before being elected to Parliament for the Greens in 2011.
Ms Swarbrick says one of the many reasons she joined the Greens was the party's commitment to internal democracy.
"Denise is an awesome MP and I'm priviledged to have been considered alongside her. We'll be campaigning hard together," she said.
The general election will take place on September 23.