Australian actor Hugh Jackman has vowed to "do anything" to protect his family, after US police arrested an alleged stalker who chased him into a New York gym with an electric razor.

The star was outside the gym on Saturday morning when the 47-year-old woman approached him, a New York Police Department (NYPD) spokesman said. Media reports said she was screaming "I love you."

The 44-year-old actor told officers that the woman approached him and "displayed an electric razor," said NPYD spokesman James Duffy, adding: "She has approached him before at other locations."

"This happened in front of the gym. She was trying to start a conversation with him and trying to get physically close to him. But he fled into the gym and she followed, and that's when (gym) security people stopped her.

"There were no injuries. She was escorted out by the gym security. She fled the scene, leaving the razor behind. We recovered the razor, and we found her a couple of hours later walking about on the street," he told AFP.

The woman, identified as Katherine Thurston, has been charged with stalking, he added.

A spokesman for Jackman, Alan Nierob, told AFP: "Mr Jackman will do anything, under the law, to protect his family, and appreciates all of the assistance from the DA's office on this matter."

Jackman, who made his name on the stage but is best known for his role as Wolverine in the "X-Men" movie series, was nominated for a best actor Oscar this year for his role in musical adaptation "Les Miserables."

The Australian star is married with two children.