Hugh Jackman calls James Bond Ridiculously Funny/Reuters
Hugh Jackman was allegedly attacked by Katherine Thurston at a New York gym.

Hugh Jackman's alleged stalker has walked free from prison after accepting a plea bargain with prosecutors.

According to the New York Daily News, Katherine Thurston was arrested in April 2013 after allegedly attacking the X-Men star with an electric razor at a New York gym.

The 46-year-old defendant is said to have thrown the shaving blade, which was filled with her pubic hair, at the Hollywood actor before fleeing the scene.

Following her arrest, she was committed to a psychiatric unit for six months until a doctor at the facility confirmed that she was fit enough to stand trial. She was later transferred to a detention centre and held on a £31,250 bail bond, or £15,625 cash.

Thurston, who had no criminal record at the time of her arrest, did have a history of harassment.

Katherine Thurston
Katherine Thurston appears in court following the attack. CBS

She had allegedly once turned up at Jackman's West Village home to declare her undying love for the 44-year-old Australian heartthrob and has also been seen outside his daughter school.

Under the terms of the agreement she pleaded guilty to burglary, stalking and harassment charges in exchange for time served and probation.

"She's happy the case is over and she's looking forward to getting back with her family," her lawyer Liz Beal said after the ruling.

She will return to court today (20 March) for sentencing.