"Guardians of the Galaxy 2" director James Gunn shared a harrowing tale of how his dog nearly died after consuming marijuana-infused chocolate coffee beans, and saluted the team at South Atlanta Veterinary Emergency & Specialty Center, which saved his furry friend.

MORE: "Guardians of the Galaxy 2" stars at "Captain America: Civil War" screening

"The night before I was supposed to leave Atlanta, my dog Von Spears went into seizures," wrote in a lengthy post on his official, public Facebook page. "He started walking in circles and falling and twitching arrhythmically, as if he had lost all neurological function. I was terrified - my dog is everything to me."

The vet team sprang into action when they arrived and asked, "has your dog been around any marijuana or marijuana-type-stuff? That's where I've seen symptoms like this."

Gunn doesn't drink or take drugs, but it turned out his assistant's ex-girlfriend "had left some edibles - weed-infused chocolate coffee beans - in his nightstand."

The assistant tossed the items while packing, and the dog fished them out of the trash can. Once the vet folks knew what they were dealing with, they were able to quickly chart a treatment plan.

"When the tech told me that he was probably going to be fine, I broke down in tears," Gunn wrote.

"The clinic had to keep watch on him for 24 hours, pumping him with fluids, but he was fine when he got out. Better than fine, really - he was playful as a puppy with all those life-enriching fluids."

His story has a happy ending, which he hopes will be instructional.

"In sharing this story with friends afterwards, I discovered nearly everyone I know has a story about a dog getting into edibles. Dogs that go into seizures like mine, dogs that walk around for days on end stoned and confused and unhappy, and even some dogs that have died due to large doses. It's incredibly common, and yet I had never heard about it," he wrote.

"So, just, whether you partake in edibles or your friends do, be a little more careful with keeping them in a safe place if you have pets. Probably babies too," he added. "If pets OR kids are ever around your home, keep your edibles safely stashed away. If not, then leave them out lying wherever you want. Hope you have a great day."