A hidden danger at summer cookouts for dogs: Corn on the cob. Here's why it can be deadly.

Most dog owners know pooches shouldn't have chocolate. But there's another common food your dog shouldn't chow down on: corn on the cob.

That means warm weather cookouts and gatherings will soon present a surprising danger for dog owners' furry friends.

Dogs can eat corn – it is an ingredient in many commercial dog foods – and can be part of a well-balanced diet for your pet, according to the American Kennel Club. (Just make sure your dog isn't allergic to corn before giving them some.)

But corn on the cob is a no-no for dogs because the cob is indigestible. Eating some of it could mean surgery – or even death – for your dog.

So dogs can eat corn, but not corn on the cob? Why is that?

Unlike chocolate, corn on the cob doesn't contain toxins that are dangerous to dogs. The problem here is that dogs cannot digest the cob itself.

"The biggest concern is the potential for the cob to get stuck in the digestive tract," said Dr. Tina Wismer, senior director of toxicology at the American Society for the Prevention of Cruelty to Animals' Animal Poison Control Center.

But corn itself — whether from the cob, a can or in dog food — can be a healthy part of a dog's diet.

Corn contributes vitamins and minerals and is a rich source of linoleic acid, an essential fatty acid that dogs must get in their diets, according to the Cummings Veterinary Medical Center at Tufts University.

Your dog just ate chocolate: Here's what to know and what you need to do first.

What's everyone talking about? Sign up for our trending newsletter to get the latest news of the day

My dog gnawed on and ate part of a corncob. What do I do?

Because corncobs are hard to chew and undigestible, they do not break down when passing through the digestive tract, often causing blockage and sometimes perforation, said Michael San Filippo, spokesperson for the American Veterinary Medical Association.

Depending on the size of the dog and the amount ingested, pet owners should call their veterinarian if their dog eats corncob, Wismer said.

Corncobs seem tough, but they are "quite fibrous at the core," she said. "Some dogs will chew them into small enough pieces to pass while others will swallow them whole or in large chunks."

How much corncob a dog could possibly consume without serious injury depends on its size and the diameter of the intestine, Wismer said. A medium to large dog has a diameter of 9-10 mm (0.35-0.39 inch), while small dogs have a 5.5 mm (0.2 inch) diameter at the smallest part of their digestive tract. "So pieces that can move out of the stomach can get stuck further down," she said.

What happens if my dog eats a cob?

If a corncob gets stuck in a dog's digestive tract, it can potentially be life-threatening. Surgery is usually required to remove the cob, Wismer said. "The dog may vomit, will not eat and can become very lethargic," she said.

If you didn't see it happen, but suspect your dog ate all or part of a corncob, there are some signs of digestive blockage beyond repeated vomiting, San Filippo said. These include: diarrhea, decreased appetite, lethargy, a sore belly, bloating, hunching and straining to poop. If you see any of these signs in your dog, or notice choking, call your veterinarian immediately, he said.

Yes, dogs can get a sunburn: What to know to keep your pets safe this summer

How long does it take a dog to recover after eating a cob?

If a corncob gets stuck in your dog's digestive system, the treatment is surgery to remove it, which can take several weeks to fully heal from, Wismer said.

How do I keep corncobs away from dogs?

Make sure to immediately throw away corncobs in a place your dog cannot get to them. "Not only is the cob tasty to them, but if you use butter, it may be irresistible," Wismer said.

At outdoor barbecues and gatherings, make sure garbage containers are inaccessible to dogs, with secured lids if possible. and keep food out of your dogs’ reach.

"Training your dog to 'leave it' can help in times when," San Filippo said, "despite your best efforts, they still manage to find a cob or other potentially dangerous item."

Follow Mike Snider on Twitter: @mikesnider.

This article originally appeared on USA TODAY: My dog ate a corncob: What to do, how to keep your dog safe