Firefighters in Maryland said they had to cut away part of a metal gate to free a horse with its hind legs stuck between the bars.

The Church Hill Volunteer Fire Company said crews responded to a report of a horse in distress and arrived to find the equine's back legs were stuck between the metal bars of a gate.

"Apparently the horse had been kicking and jumping up and down, and it got too close to the gate," Assistant Fire Chief Steve Hurlock told the Kent Island Bay Times newspaper.

Queen Anne's County Animal Control personnel were called to the scene and helped the firefighters keep the horse calm while using a hacksaw to cut through part of the fence.

The rescuers freed one of the horse's legs, and it pulled its other leg free without assistance.

Hurlock said the horse appeared to have sustained only minor injuries.