A horse was hoisted to safety Friday after getting trapped inside a dumpster at an equestrian center in Southern California, according to reports.

Huntington Beach firefighters used a forklift and a harness system to pull the horse, named Rodeo, out of the metal container, FOX 11 of Los Angeles reported.

Passersby kept the horse calm until emergency crews arrived on scene, the report said.

DROUGHT THREATENS WILD HORSES THAT ARE SYMBOL OF THE WEST

Neither the horse nor the firefighters were injured, the Huntington Beach Fire Department said in a tweet.

Officials were called to rescue the horse shortly after 2:30 p.m., FOX 11 reported.

HORSE WANDERS INTO FRENCH BAR AFTER BREAKING LOOSE AT RACETRACK

Rodeo had slipped out of his enclosure and stepped off of raised platform lined with dumpsters, witness Kra Brundage told KTLA-TV. The horse then stepped on top of the dumpster and fell in.

CLICK HERE TO GET THE FOX NEWS APP

"To a horse’s eye, that looks solid," she said. "So he thought he was stepping onto something solid, and ended up falling into the trash can."