Media playback is unsupported on your device Media caption TVNZ correspondent Damian Christie: "It was a very dirty campaign"

New Zealand's governing National Party has won an emphatic victory in general elections, near-complete results show.

With nearly 100% of the votes counted, PM John Key's party held 48%, with the opposition Labour Party lagging behind on 25%. The Greens had 10%.

Mr Key has recently been forced to defend his party against claims of dirty politics and mass spying.

But he has now won his third term in office, with Labour leader David Cunliffe admitting defeat.

"I have called John Key and congratulated him and acknowledged he will continue to be prime minister of New Zealand," Mr Cunliffe was quoted as saying by the AFP news agency.

Meanwhile, Mr Key said: "I'm ecstatic, it's a great night."

Image copyright Getty Images Image caption David Cunliffe said the Labour Party should now analyse the reasons of its poll defeat

Nearly 3.5 million people were eligible to vote.

Under New Zealand's proportional representation electoral system, a coalition government is more likely than a majority for one party.

But the results suggest Mr Key might be able to govern alone, without the support of the populist New Zealand First party.

The National Party is projected to win 61 seats in the 120-member parliament, according to the national electoral commission.

Labour looks set to secure 32 seats, while the Greens will have 13.

The Internet-Mana Party - which has been funded by online billionaire Kim Dotcom - failed to get a single seat.

Mr Dotcom, who is accused of copyright infringement in the US, took personal responsibility for the failure. The German-born mogul was not a candidate himself because he is not a New Zealand citizen.

"Distractions"

Mr Key, a former banker, campaigned on his strong economic track record and has pledged tax cuts.

Image copyright Getty Images Image caption Whistleblower Edward Snowden and Wikileaks founder Julian Assange took part in Kim Dotcom's rally via video links

Mr Cunliffe promised to narrow the wealth gap through a capital gains tax and raising the minimum wage.

However, the main policy issues have been somewhat overshadowed by allegations in a book, Dirty Politics, that National used bloggers to smear opponents. It resulted in the resignation of Justice Minister Judith Collins.

Mr Dotcom held an event featuring Edward Snowden, the US National Security Agency (NSA) whistleblower, and Wikileaks founder Julian Assange, who accused Mr Key of mass domestic spying.

However, Mr Key dismissed the allegations.

"There's been all these distractions and different issues going on but the polling hasn't really moved," he told reporters on Friday. "There's just the natural tightening you get in any [campaign] cycle."