A quick-thinking hero used a piece of vacuum hose to save the life of an Australian worker trapped underwater.

The worker, known only as John, was operating an excavator on a pontoon, laying mooring poles, when the machine toppled into the water.

David Thomson, the owner of Bluey's Boathouse at Mordialloc Creek in Melbourne, Victoria, Australia, saw what happened and rushed to the stricken worker.

For almost 10 minutes, Thomson and the man's colleague struggled to keep his head above the water while he was trapped in the machine.

"I heard the splash and when he half came up I stripped off the clothes and tried to get him out," Thomson said.

"He was essentially drowning in front of my eyes. He was losing strength and getting bluer and bluer," he said. "After five minutes we could see it was futile. I was yelling out for a tube or snorkel or a funnel."

A witness brought a small section of vacuum cleaner pipe to the scene.

Thomson put the pipe into the mouth of the now-submerged John and desperately started blowing into it. "He was able to take a few breaths," he said. "I kept blowing into the end of it to get air to him. He went totally blue and lost consciousness. But then he went limp and that's when we got him free of the excavator."

It took at least another two minutes to drag the 58-year-old worker out of the excavator to paramedics arriving at the scene.

Click here to read more on this story from the Herald Sun.