New South Wales police officers have shot dead a man they say was wielding an axe and threatening them during a house fire north of Sydney.

The officers had forced their way through the front door of a home at The Entrance Road in Erina about 10.20pm after noticing flames coming from the side of the house.

The man allegedly threatened the officers with an axe before he was shot, a police statement on Saturday said.

The wounded man died a short time later despite paramedics’ treatment.

Police were called to the address near Terrigal Road after reports of a dispute between neighbours.

Assistant commissioner Max Mitchell said: “I could only imagine what was going through the minds of those officers, particularly when they were attending that house with the mindset of potentially trying to rescue an occupant or occupants with the house on fire.

“It would appear that the police ... had no other opportunity other than to take the action they did.”

Mitchell said the 45-year-old man had been holding the axe in a “hostile position” and was known to police, with suspected drug and mental health issues.

Landscaper Gavin Reeves said he heard the gunshots but did not realise the seriousness until he read the news on Saturday morning.

“I was watching TV and just heard two or three quick pops,” he said. “I didn’t think very much of it. I’d never heard a gunshot before.”

One woman who said she lived a few doors from the Erina home thanked police for their “time and care to the situation”.

“It was horrible for everyone,” she posted to Facebook.

A critical incident team within the homicide squad will investigate the death.

Their investigation will also be subject to independent review.

The NSW coroner will determine the man’s cause of death and examine the circumstances leading up to it at a later date.