The owner of three dogs who was landed with a hefty vet bill after his pets encountered a prickly situation with a porcupine has raised thousands of pounds in a crowdfunding campaign.

Dennis Mazur, a youth worker, was out walking his dogs – Mahalo, Nestah and Solijah – when they came across the spiny rodent and were stabbed with its quills in Saskatchewan, Canada.

Mahalo’s survival was said be a ‘miracle’ after quills migrated to her lungs and heart. Photograph: Mike Gerrand/GoFundMe

Mahalo was severely injured and required extensive surgery to remove quills from her heart and lungs, Mazur told CBC news.

“Quills are a tricky thing,” Mazur said. “They go in and they’re just sort of barbed and they migrate and travel and that’s the fear right now. Mahalo had quills that migrated up into her lungs and into her heart, and the fact that she’s alive right now is a full miracle.”

A Canadian porcupine. The fate of the porcupine involved in the confrontation with the three dogs is not known. Photograph: Bruce Corbett/Getty Images/All Canada Photos

His friend Mike Gerrand wrote on the funding page: “The vet bills are nearing C$8,000 [£3,950] and climbing to save Mahola’s life so I have started this campaign to offset some of the costs.”

Nestah received a muzzle full of quills, while Solijah got off relatively lightly with the spines embedded in his lower jaw looking like a prickly goatee.

It could have been worse for Solijah. Photograph: Mike Gerrand/GoFundMe

Gerrand said: “These dogs are the love of my dear friend Dennis’s life. They travel everywhere with him and are loved by the special needs clients Dennis works with.”

Mazur is a youth worker at the Street Culture project and runs a small organic farm outside Regina, he said.

Mahalo after the quills were removed. Photograph: Mike Gerrand/GoFundMe

“Dennis has had to take weeks off work to travel to Saskatoon to be with his baby girl,” Gerrand said, referring to Mahalo.

Mahalo on the mend. Photograph: Mike Gerrand/GoFundMe

He thanked all those who had helped raise more than C$12,000 to treat the dogs, and said: “I humbly thank each and everyone of you fine dog loving folks from the bottom of my heart.”

Mazur was back at the vets on Wednesday to get quills removed from Nestah’s spine and cheeks, Gerrand said. “He is staying home to care for these animals,” he wrote in an update.