In 2006, we wept as Flynn died on Home and Away. Now Joel McIlroy is facing his own battles.

More than 13 years on from the death of his Home and Away character Flynn Saunders, actor Joel McIlroy has appeared before a NSW court after allegedly punching a female police officer seven times.

In 2006, Australian fans wept for Home and Away character Flynn as he died from terminal skin cancer.

The death of Sally Fletcher’s husband was a heart-wrenching moment on the soap opera, and the performance from actor Joel McIlroy earned him a Silver Logie nomination that same year.

Relive the heartbreaking moment Flynn tells Sally about his cancer on Home and Away. Post continues below video.

Video by Seven Network

On Wednesday the 46-year-old actor cried before Sydney’s Central Local Court as a judge denied his bail application, meaning he will spend at least the next two weeks locked up for allegedly punching a female police officer seven times.

News.com.au reported McIlroy was upset throughout the bail application hearing, which he appeared at via video link from Surry Hills Police Station.

Police alleged McIlroy approached officers who were arresting a man unrelated to him near Sydney’s Central Station on Tuesday and was told to leave, but instead attacked a 29-year-old female senior constable.

It is alleged he punched her seven times. The attack resulted in a dislodged vertebrae, swelling to her right cheek and soft tissue damage.

McIlroy shouted “lies” as a police prosecutor alleged he had also attempted to put the officer in a headlock. He was told to be quiet by the magistrate on more than one occasion, news.com.au reported.

The court heard the constable’s injuries will require “ongoing treatment by a physiotherapist”.

joel mcilroy
McIlroy in 2003. Image: Getty.

McIlroy's lawyer told the court his client had been diagnosed a decade ago with Huntington's disease, an inherited degenerative disease that causes the breakdown of nerve cells in the brain, the Sydney Morning Herald reported.

The death of brain cells in certain areas of the brain resulted in a gradual loss of cognitive, physical and emotional function. There is no cure.

McIlroy has struggled with poor impulse control as a side-effect, his lawyer said.

When the court heart how the disease had taken McIlroy's father's life, the actor broke down.

McIlroy was charged with two counts of assaulting an officer in execution of duty, resisting an officer in execution of duty, and wilfully obstructing an officer in execution of duty.

McIlroy's mother was willing to lodge $5000 as bail for her son to be released into her custody, but Magistrate Robert Williams refused bail due to the seriousness of the offence.

If prosecuted, McIlroy could face seven years behind bars. He will next appear in court on November 5.

00:00 / ???