Media playback is unsupported on your device Media caption John Key: "It's the right time for me to come home"

New Zealand Prime Minister John Key's unexpected announcement that he will resign on 12 December has changed the political game, writes New Zealand political columnist Colin James.

Mr Key's announcement caught even his cabinet by surprise. And it appears to have been unforced.

He told journalists he was not a "career politician" and could not commit to serving out the whole of another parliamentary term as prime minister, and so should leave now to give time for a new leader to settle in.

Few leaders know when it is time to go, he said, and he was determined not to be one of them.

Mr Key's National party has been in power since 2008 on election scores of 45%, 47% and 47%, and averaged 48% in opinion polls in November. Its prospects for a fourth three-year term in the election next year, due by early November, looked good.

Part of that support is Mr Key's personal appeal across a wide spectrum of voters. His personal poll ratings, although down a bit, are still very high. One reason why New Zealand does not share North Atlantic countries' populist surges is his easygoing optimism and empathy.

Another reason is his close working relationship with Deputy Prime Minister Bill English, who is also finance minister.

Mr English has been fiscally cautious, though not austere - weathering the global financial crisis and a devastating earthquake in 2011, which cost the government the equivalent of about 7% of GDP. He has also developed a "social investment" programme aimed at early action to avert later costs.

Image copyright AFP Image caption Bill English has been thrust into the spotlight, as Mr Key's preferred successor

While the Key government has edged some economic policy rightwards, including a highly controversial partial sale of state-owned enterprises in 2012-13, it has also taken some steps more associated with left-of-centre parties - for example in social housing, in increasing welfare benefits, in setting a 2050 target to rid the country of rodents to preserve native wildlife and in declaring the Kermadec Trench a marine sanctuary. Mr Key also supported gay marriage.

This spread has left less room for the populist New Zealand First party, which averaged 9% in November polls; the left-of centre Labour, which averaged 27%; and the Greens, on 12%.

Mr Key's departure opens some room for those parties. Even if National wins a fourth term in 2017, it is likely to be with a smaller vote and needing New Zealand First.

Up to now it has governed with the support of three very small parties - a Maori rights party (the Maori party), a libertarian party (ACT) and a centrist party (United Future).

Image copyright AFP Image caption Mr Key said his resignation was motivated by a wish to spend more time with his wife and family

Much will depend on who replaces Mr Key. He said he will vote for Mr English if he seeks the job. But Mr English, while highly regarded by cognoscenti, has little charisma and in the 2002 election led National to the lowest score, 21%, for a major party since 1902.

Other contenders include the minister for economic development, tertiary education and science, Steven Joyce - like Key, not a "career politician" - and Paula Bennett, climate change, social housing and associate finance and tourism minister.

None can match Mr Key's personal appeal.

Whoever wins, there will be little change in policy direction before the election. Strong and growing budget surpluses will allow some relaxation of social and other spending and a combination of tax cuts and tax rebates for lower and middle income earners in the 2017 pre-election budget in May.

A bigger change would come if Mr Key's departure enables Labour and Greens to build enough support to form a coalition next year. Both want more active social and environment policies and substantial changes in taxation, to address inequality.

The mood in Labour leader Andrew Little's office after the announcement was buoyant. That came off the back of holding a Labour seat in a by-election on Saturday with an unexpectedly high 66% of the vote.

But the two parties' combined vote will need to be at least 46% to form a coalition, well above their current 39%, or they will need New Zealand First which on current indications is more likely to go with National.

So, while Mr Key's departure changes the game, it may not give it to the other side.