Image copyright Getty Images Image caption Mr Key told reporters that he had a "very warm and friendly relationship" with the cafe's staff

New Zealand Prime Minister John Key has apologised to a woman who works at an Auckland cafe for repeatedly pulling her hair.

The unnamed waitress wrote in a blog that he had tugged her ponytail on several occasions, even after she had asked him not to.

Mr Key's office said on Wednesday that his actions were meant to be "light-hearted" and he apologised.

The incident has sparked criticism from an opposition party and the public.

The waitress wrote on the Daily Blog that the hair-pulling started during last November's election campaign, when Mr Key's National Party was re-elected.

She said that she had begun avoiding him whenever he came into the cafe, and had told his security officers that she didn't like her hair being pulled.

She said she finally told Mr Key in person to stop in March, but he continued to do so.

He later apologised and gave the waitress two personalised bottles of wine.

Mr Key's office said in a statement: "His actions were intended to be light-hearted. It was never his intention to make her feel uncomfortable and he has apologised to her."

Mr Key told reporters on Wednesday that he had "a very warm and friendly relationship" with staff at the cafe where "we have lots of fun and games there, there's always lots of practical jokes and things".

One of the leaders of New Zealand's Green Party, Metiria Turei, said his actions raised questions about workplace bullying.

"As politicians our job is to make people feel safe at work, not bullied... We should expect higher standards of behaviour from our prime minister, not this weird hair-pulling," she told The New Zealand Herald.

New Zealanders have been discussing Mr Key's actions on Twitter with the hashtags #tailgate. and #ponytailgate.

Controversial internet tycoon Kim Dotcom, who has criticised Mr Key's policies on internet freedom, also tweeted on the incident.