Labor leader Chris Hepkins has been sworn in as New Zealand's prime minister, following Jacinda Ardern's shock resignation last week.

"This is the privilege and the greatest responsibility in my life," Hipkins, 44, said. "I am excited to take on the challenges that lie ahead."

In Ardern's last public appearance, 42, on Tuesday, before leaving office, she said the people she would miss most were the "joy of the job".

Last Sunday, the ruling Labor Party announced the selection of Hepkins as party leader and the country's forty-first prime minister.

Ardern announced her resignation last week, saying that she would not run for re-election, and that her term as prime minister would end no later than February 7.

Ardern became the youngest female head of government in the world after she was elected prime minister in 2017, at the age of 37.

Hepkins will serve as Prime Minister of New Zealand, which has a population of 5 million, for more than 8 months, when the general elections will be held on October 14, 2023.