Giving medicine to a pet can be an ordeal. If you’re lucky, your dog or cat will gobble up even the most foul-tasting concoction in his favorite food. If you’re not, there’s the chasing, the wrestling, the growling — that’s both of you — before you get the tablet, pill or liquid down the animal’s throat.

If your pet puts up a fight — or even scratches or nips — when you try to give him medicine, try these tips from holistic veterinarian Sheldon Gerstenfeld, VMD, author of “The ASPCA Complete Guide to Dogs” and “The Cat Care Book.”

Hide meds in strong-tasting foods. Animals’ super sensitive noses can suss out a foul-tasting pill buried in a chunk of mild cheese, so don’t be surprised if your pet eats the “wrapper” and spits out the pill. Offer medicine in more pungent foods like peanut butter, camembert, sharp cheddar) or liverwurst.

Pop the pill in a pill pocket. These commercially available treats have built-in pouches for pills and capsules. They come in a variety of pet-friendly flavors like liver and chicken.

Ask for flavored meds. Many commonly prescribed meds for pets, like arthritis drugs and oral flea preventatives, come in flavors animals love, such beef, liver and, for cats, seafood.

Use a veterinary compounding pharmacy. It’s a little more expensive, but compounding pharmacies can create a delivery system for drugs — suspending them in flavored liquid, powders, pastes, even biscuits — that will make it easier for you to medicate your pet. For example, it might be easier to give medicine in liquid form to a dog with a short nose. Simply insert the dropper gently between the teeth and the cheek while the animal’s chin is tilted upward. Talk to your vet about your options.

Manually insert the pill in the dog’s mouth. If your dog will let you, open his mouth by firmly gripping his muzzle with the thumb and index finger of your nondominant hand. Hold the pill in your dominant hand and use the middle finger of that hand to open your pup’s lower jaw. Moving quickly, drop the pill as far back on the tongue as possible. Close the dog’s mouth immediately and blow on his nose or massage his throat to encourage him to swallow.

Manually give your cat a pill. With your non-dominant hand, hold the cat’s head at the cheekbones. Tilt her head back and her lower jaw will drop open. With your dominant hand, hold the pill or capsule between your thumb and finger. Use the remaining fingers to keep the cat’s mouth open. Press down on the cat’s incisors, not the sharp canine fangs. Drop the medication as far back on the cat’s tongue as possible and blow on her nose or stroke her neck to make her swallow.

Arm yourself with a pill gun. Also known as a pet piller or pusher, these syringe-like devices have a soft rubber tip that hold a pill or tablet, allowing you to insert the medicine at the back of the animal’s throat. Clamp your pet’s mouth shut, rub his neck to help him relax, and the medicine should go right down.

Denise Foley is a veteran health writer and a former contributing executive editor at Prevention magazine.