John Key says he now realises his behaviour was inappropriate but insisted he was merely "horsing around", not acting maliciously.

New Zealand Prime Minister John Key publicly apologised Wednesday to a waitress who labelled him a "schoolyard bully" for repeatedly pulling her ponytail on visits to her cafe.

As women's groups expressed outrage, Key said he now realised his behaviour was inappropriate but insisted he was merely "horsing around", not acting maliciously. "It was all in the context of a bit of banter that was going on," he told TVNZ, saying he apologised and gave the woman two bottles of wine when he realised she had taken offence.

The unnamed Auckland waitress recounted her story in an anonymous column on left-wing website thedailyblog.co.nz, saying the conservative leader's actions reduced her to tears. She said Key persisted in tugging her hair on at least half a dozen separate occasions, even though she had clearly signalled her displeasure and once warned his security detail she would punch him if he continued.

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". "He was like the schoolyard bully tugging on the little girls' hair trying to get a reaction, experiencing that feeling of power," she said in the blog.

The waitress said Key eventually got the message and stopped tormenting her in late March, telling her he had not realised how upset she was at his behaviour, which lasted for several months. "Really?! That was almost more offensive than the harassment itself," she wrote.

'Crossed the line'

Key won a third term in office last year and is normally renowned for his political radar, enjoying 49 percent support in opinion polls even after seven years in power. Quizzed on whether he had acted appropriately, the 53-year-old said he had visited the cafe for years and had a fun relationship with staff, including practical jokes.

"It's a very warm, friendly relationship. In that context you'd say yes, but if you look at it now, no," he said.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.