A dog named Spot has been credited for the discovery and subsequent rescue of a man stuck head-first in a septic tank in Sydney’s north.

Paramedics were called to the scene in Terrey Hills just after 12.30pm on Wednesday after the border collie heard the man’s cries.

The dog’s owner, 13, called authorities to the scene.

Intensive care paramedics assisted by Fire and Rescue NSW freed the man, who was treated for minor head lacerations before being taken to hospital in a stable condition.

The man was a contractor working on the property when he became stuck in the septic tank, commonly used where homes are not connected to sewerage.

He had been trapped upside down and unable to free himself from the tank as the water rose.

NSW Ambulance acting inspector Charnan Kurth said the four paramedic crews that attended faced a challenging scene as they worked to free the man.

His rescue took about 40 minutes.

“Had the dog not heard the man’s cries, it may not have been such a good ending,” Inspector Kurth said.