John Key says it was all in the context of a bit of banter.

Agencies/Wellington

New Zealand Prime Minister John Key apologised on Wednesday for pulling the ponytail of a waitress who accused him of bullying, media reported.

The unnamed waitress in an Auckland cafe said on a blog site that Key had pulled her hair over several months and initially she thought he was being "playful and jolly".

However, she said Key kept pulling her hair when he visited the cafe over a six-month period and she became increasingly annoyed.

"He was like the school yard bully tugging on the little girl's hair trying to get a reaction, experiencing that feeling of power over her," the waitress said in the blog.

At one point, Key's wife Bronagh told him "leave the poor girl alone", the woman wrote, saying that the prime minister gave the impression "that he just didn't care".

She said she finally confronted Key in late March and threatened to hit him if he did not stop. She said Key returned to the cafe and gave her two bottles of red wine and said sorry.

Key, en route to Turkey for the commemoration of World War One battles, said he visited the cafe, close to his house, often and he had a "fun relationship" with the staff.

"There's always lots of horsing around and sort of practical jokes and that's all there really was to it," he told reporters during a stopover in Los Angeles.

"...I realised she had actually taken offence because it was all in the context of a bit of banter that was going on and so I obviously immediately apologised for that."

The row stirred a strong reaction on social media and was soon trending on Twitter under the hashtag #ponytailgate, with most criticising Key but some saying it would not affect his popularity ratings.

The National Women's Council said it was difficult for a female cafe worker to stand up to the prime minister and Key had "crossed the line" with his unwanted touching.

"The fact that our prime minister has joined the list of people outed for sexism highlights how much sexism is part of our culture. And it starts at the top," it said.

Human Rights Commissioner Jackie Blue also weighed in saying: "It's never okay to touch someone without their permission."

Green Party co-leader Metiria Turei described Key's behaviour as "weird", saying it was disrespectful towards the woman and her job.

"New Zealanders know you can't walk into a cafe and start tugging on someone's hair, especially if they've told you they don't like it," she told reporters.

"John Key should be held to the same standards as the rest of us."