SAN FRANCISCO (CBS SF) – San Francisco police officers and park rangers turned into horse wranglers early Wednesday after several horses escaped from the stables in Golden Gate Park.

According to park officials, a stable attendant noticed a gate was open at the Bercut Equitation Field located in Golden Gate Park at around 5 a.m. One horse made it out of the enclosure and was soon followed by others.

“A Good Samaritan called the SFPD (to report the horses) who assisted (in rounding the horses up),” said San Francisco Recreation and Park spokeswoman Sarah Madland. “They call that (rounding up the horses) additional duties.”

Upon further investigation, it was discovered that 23 horses had escaped the stable area and were loose and galloping along trails and roads inside the park.

The horses did not have harnesses so they had to be roped and corralled. They were herded into a fenced in dog park.

Eventually, the horses were returned to the equitation field unharmed. The horses were in the stables as part of a pilot program that runs until the end of June to allow riding in park.

“The key right now is to make sure this doesn’t happen again,” Madland said. “We are looking into how this happened and what preventative measure we might take.”

San Francisco police and park officials were investigating how the gate had gotten open.