At bay

At a distance.

We tried to keep the dog at bay when we entered the building.