You can use a gate to keep in pets.