New Zealand is set for a centre-left coalition government led by Labour head Jacinda Ardern.
Ms Ardern has been opposition leader for the last three months. At 37, she is set to be the country's youngest prime minister since 1856.
Her Labour Party came second in September's election, where no party was able to secure a majority.
They are now tipped for power after the small New Zealand First party agreed to join them in government.
The new coalition will also be supported by the Green Party.
New Zealand First head Winston Peters on Thursday announced his party's decision to ally itself with Labour, after 26 days of negotiations.
His party holds the balance of power with nine seats, while the Labour-Green bloc has 54 seats and the National Party 56 seats.
He said his party was faced with a decision between "modified status quo or change" and decided to go for change.
Who is Jacinda Ardern?
Involved in left-wing politics since her teens - including spending time in the UK as policy adviser to Tony Blair
First entered parliament in 2008, at the age of 28
Took over the Labour leadership on 31 July
Made tackling inequality, affordable housing and student debt a key part of her election campaign
Has been outspoken on feminism and mental health
Brought up a Mormon - but left the faith over its opposition to same-sex marriage
Speaking to reporters after the coalition deal was announced, Ms Ardern said: "I feel extraordinarily honoured and privileged to be in the position to form a government with Labour at the lead."
She said the government would work hard to deliver on its campaign promises, and that New Zealand First would have four cabinet positions and one parliamentary under-secretary.
Correspondents say the new coalition is likely to mean a significant cut to immigration quotas and new controls on foreign ownership of property.
Bill English became prime minister in 2016 when his predecessor John Key unexpectedly resigned.
He had promised voters experience and reliable economic management.