In a new YouTube video that has gotten over 4 million hits in just one week, a cat can be seen barking — yes, barking like a dog — out an open window. But when its owner, camera in hand, startles the cat, it instantaneously switches to meowing.

Why and how is the cat barking? And why does it stop — is it embarrassed? We asked a leading pet behavior expert to weigh in. [Watch the video]

"While it isn't super normal, it's not unheard of for cats to bark," said Nicholas Dodman, a veterinary behaviorist and professor at the Cummings School of Veterinary Medicine at Tufts University. "The arrangement of the cat's larynx, trachea and diaphragm is similar enough to a dog's that if they operate the machinery in the right way, it will produce a noise that's like a bark."

Barks, Dodman explained, result from a sudden rush of air through the air passage, and can be produced by an overly excited cat. "It's kind of a forced meow."

The cat may have learned to make the barking noise from a dog co-pet, or a doggy neighbor — perhaps the very animal at which the cat is barking in the video. "It could be that it's imitating or 'copy-catting' a sound that it hears often. It seems to see something out the window; whether it is barking in response to a dog, we don't know," Dodman told Life's Little Mysteries.

Caught in the act?

As for why the cat stops barking when its owner approaches, "it's certainly not because it is embarrassed," he said. "That level of thought is way too complicated for a cat. I don't believe they get embarrassed period. That's a secondary emotion that no domestic animal has been proven to exhibit."

Cats don't know that they aren't supposed to bark, so they wouldn't know to be embarrassed when caught doing it, he explained. "It does seem like coincidence that it stops barking and starts meowing when its owner comes over, but what's really happening is that turning its head reduces the energy going out through its airway, so the bark turns into a meow."

"Not quite as dramatic as it looks, Dodman said. "But it makes a good story."

This story was provided by Life's Little Mysteries, a sister site to LiveScience. Follow Natalie Wolchover on Twitter @nattyover.