Chlöe Swarbrick has won the Auckland Central electorate by just a few hundred votes, confounding recent polls and winning the party's first electorate since 2002.
In recent polling, Swarbrick had been trailing behind both Labour's Helen White and National's Emma Mellow, though the numbers were always close.
But Swarbrick claimed 9060 votes to White's 8568, with 100 percent of the votes counted tonight.
The country's youngest electorate of 60,000 people, mostly highly educated people of European and Asian descent.
The seat has been held by National's Nikki Kaye for the past four elections, but Kaye announced she would resign after Todd Muller resigned as National leader.
Swarbrick said they always knew it would be a close race.
"The feeling is that we left everything out there on the floor, we ran a campaign that we are incredibly proud of, we built a community along the way.
"It always was going to come down to turnout, we actually heard from some scrutineers who were there obviously watching people voting today that there were huge lines and at some of the voting booths they ran out of some of the special voting papers."
She said there had consistently been about 100 votes between the top candidates throughout the race.
"Can't take anything for granted ... we have campaigned with everything that we have got so we are proud of ourselves as far as that goes."
She said the challenge in Auckland central was being the perceived "third party" candidate during the second lockdown.
Swarbrick gained the limelight when contesting the Auckland mayoralty in 2016, winning 26,474 votes and coming in third place - an impressive showing for the youngest candidate at age 22.
The move put her on the map and Swarbrick decided to run for the Green Party at the general election the following year.
The Green Party has only before held one electorate seat when Jeanette Fitzsimons won Coromandel in 1999. Fitzsimons was defeated in the seat at the following election in 2002 but remained in Parliament on the party's list.
Read more about the 2020 election: