New Zealand Prime Minister Jacinda Ardern has announced she will resign next month.
"For me it's time," she said at a meeting of members of her Labour Party. "I just don't have enough in the tank for another four years."
Ms Ardern, who became prime minister in a coalition government in 2017 and then led her centre-left Labour Party to a comprehensive victory in an election three years later, has seen her party and personal popularity drop in recent polls.
In her first public appearance since parliament went into its summer recess a month ago, she told Labour's annual caucus retreat that during the break she had hoped to find the energy to continue as leader, "but I have not been able to do that".
Ms Ardern said the next general election will be held on Saturday 14 October and she would continue as an electorate MP until then.
"I am not leaving, because I believe we cannot win the next election, but because I believe we can and will," she said.
Ms Ardern said her resignation would take effect no later than 7 February, adding that the Labour caucus would vote on a new leader on 22 January.
Deputy Prime Minister Grant Robertson said he would not be putting his name forward.
Ms Ardern said there was no secret behind her resignation.
"I am human. We give as much as we can for as long as we can and then it's time. And for me, it's time.
"I am leaving because with such a privileged job comes a big responsibility. The responsibility to know when you are the right person to lead - and also when you're not."
'I know what this job takes and I know that I no longer have enough in the tank to do it justice. It's that simple.’
— RTÉ News (@rtenews) January 19, 2023
New Zealand Prime Minister Jacinda Ardern will not seek re-election and plans to step down no later than early February | Read more: https://t.co/01txoZ2Oun pic.twitter.com/QIAaIJnLVU
Political commentator Ben Thomas said Ms Ardern's announcement was a huge surprise as polls still ranked her as the country's preferred prime minister even though support for her party had fallen from the stratospheric heights seen during the 2020 election.
He said that there was not a clear successor.
New Zealand's Ardern leaves legacy of kindness, disappointments
Ms Ardern said she was not stepping down because the job was hard, but because she believed others could do a better job.
She made a point of telling her daughter Neve that she was looking forward to being there when she started school this year and told her longtime partner Clarke Gayford that it was time they married.

Ms Ardern burst onto the global scene in 2017 when she became the world's youngest female head of government at age 37.
Riding a wave of "Jacinda-mania," she campaigned passionately for women's rights, and an end to child poverty and economic inequality in the country.
Eight months after becoming premier she became the second elected leader to give birth while in office, after Pakistan's Benazir Bhutto. Many saw Ms Ardern as part of wave of progressive female leaders, including Finnish Prime Minister Sanna Marin.

Her empathetic leadership style was cemented by her response to the mass shootings at two mosques in Christchurch in 2019 that killed 51 people injured 40.
Ms Ardern swiftly labelled the attacks "terrorism" and wore a hijab as she met with the Muslim community a day after the attack, telling them the whole country was "united in grief".

She promised and delivered major gun law reform within a month.
"Jacinda Ardern has shown the world how to lead with intellect and strength. She has demonstrated that empathy and insight are powerful leadership qualities," Australian Prime Minister Anthony Albanese said.
Ms Ardern won plaudits across the political spectrum for her handling of the Covid-19 pandemic, which saw the country face some of the strictest measures globally but also resulted in one of the lowest death tolls.
But her popularity has waned over the past year as inflation has risen to nearly three-decade highs, the central bank has aggressively increased the cash rate and crime has risen.
The country has become increasingly politically divided overissues such as a government overhaul of water infrastructure, and the introduction of an agricultural emissions programme. Ms Ardern and Labour have seen their opinion poll support suffer.
"There has been more and more criticism," said Bryce Edwards, a political commentator and a research associate at the Institute of Governance and Policy Studies at Victoria University of Wellington.
Mr Edwards said the appeal Ms Ardern had won from swing voters and non-traditional Labour voters at the last election due to her handling of the Covid pandemic had started to wane as the country deals with social issues.