STERLING, Mass. (CNN) — A Massachusetts man and his dog are recuperating after they fell through the ice of a frozen pond Sunday morning.

Neighbors and emergency responders sprang into action.

The wails of a dog in distress could be heard as a dangerous ice rescue plays out on a pond in Sterling.

The dog Max went through the ice yesterday morning and then his owner went after him in a canoe, but ended up in the frigid water as well.

“I saw the owner go out there with the canoe breaking ice,” said neighbor Daniel Kloczkowski. 

Kloczkowski witnessed the ordeal from his deck.

He called 911 and jumped into action.

“I went down there, grab some ropes, ski ropes with a life ring, and try to throw it out to them but couldn’t reach em,” he said.

With specialized equipment, firefighter and paramedic Jim Emerton was part of the team making the rescue.

“The things that were probably challenging was the ice was really really thin,” Emerton said.

The victim had made his way out of the water and onto the ice — likely saving his life.

“He got into the water got himself out of the water laid flat on the ice so he distributed his weight,” Emerton said. 

Once firefighters have a hold of him, they turn their attention to saving Max.  

“The dog was in quite a bit of distress pretty vocal so for all of us on shore it was tough to hear that at the same time,” Emerton said. 

The firefighter put Max into a sling and safely brought him to shore.

Today he and his owner are doing well.

“We had a good outcome for the owner as well as the dog,” Emerton said. 

“Thankful everything turned out well,” Kloczkowski said.

Emergency responders say the entire rescue operation only took about 15 minutes.