Jacinda Ardern has won a landslide victory in New Zealand's general election.

The 40-year-old won a second term as prime minister after her rival conceded following initial counts.

Ms Arderns's liberal Labour Party was shown in early counts to have nearly double the number of votes of its main challenger - the conservative National Party.

“Thank you to the people who worked so hard to share our message. Who volunteered in what felt like an endless campaign," Ms Ardern told crowds.

READ MORE: Ardern heading for big win as votes counted in New Zealand poll

“But most importantly thank you to the many people who gave us their vote, who trusted us to continue with leading New Zealand’s recovery.

“And to those amongst you who may not have supported Labour before – and the results tell me there were a few of you – to you I say thank you.

“We will not take your support for granted. And I can promise you we will be a party that governs for every New Zealander."

Scotland's First Minister Nicola Sturgeon congratulated Ms Ardern on her victory, and said part of her victory speech could perhaps "hold a lesson for Scotland".

She wrote: "Congratulations on your resounding re-election @jacindaardern.

"In a fine victory speech, these words resonate and perhaps they hold a lesson for Scotland too - 'As a nation, we can listen, we can debate...we are too small to lose sight of other people’s perspective'".