Here's how it works:
* Baying: When a dog is close to its prey but doesn't attack, it makes a loud barking sound called "baying." This sound is meant to keep the prey from escaping while the hunter gets closer.
* Bay: A bay is a narrow body of water that's partially enclosed by land. In hunting, a dog would "bay" to keep the prey from escaping into the bay.
Therefore, "keep at bay" is an idiom that literally refers to keeping something at a distance like a dog keeping its prey away from a safe haven.
Over time, this phrase evolved to mean keeping anything under control or preventing something from approaching.
Here are some examples of how "keep at bay" is used:
* "The doctor's prescription helped to keep the infection at bay."
* "The security guards were able to keep the protesters at bay."
* "A strong immune system can help to keep viruses at bay."
The idiom "keep at bay" is a figurative way of expressing the idea of prevention, control, and distance.