Atascosa County deputies rescued a horse from an oil vat on Friday night.

Officials say the horse wandered onto the property, which had an active oil pump and storage tank on it.

Pictures posted to the Atascosa County Animal Control Facebook page show the horse completely submersed in what appeared to be a shallow overfill oil vat. The horse was hanging onto the ledge with his two front hooves.

Atascosa County Animal Control Lt. Henry Dominguez was called into assist in the rescue.

The rescuers used a halter on the horse to prevent him from going in. They used a wooden plank to help when the horse’s legs got stuck on the ledge.

The horse was pulled to safety and is doing fine. He was completely covered in oil, but rescuers say he does not appear to have ingested oil.

Officials say the oil overfill was actually a partially-buried oil storage tank that was more than six feet deep.

The oil company is being contacted to make sure the danger is addressed.

Read the full Facebook post below: