OAKLAND — A herd of 50 grazing goats that “went rogue” was found on Highway 24 early Wednesday morning near the Caldecott Tunnel, the California Highway Patrol reported.

The goats were being used to control vegetation on the side of the highway but wandered down to the road on the Oakland side of the tunnel and were found there about 1 a.m.

None of the goats was hit by cars. One was reported injured, but that likely resulted from its escape from the grazing enclosure, officials said.

Highway patrol officers and crews from Caltrans were able to corral the goats on the westbound side of the freeway, and the two right lanes were closed for a half-hour as the animals were brought into a nearby Caltrans yard.

“We’re still trying to figure out how the goats made it out of their enclosure,” CHP Officer Sean Wilkenfeld said.

He added that it wasn’t the first time goats had ended up on the highway and that a similar event happened last year. Caltrans has said that the goats were contracted under its organization to a local landowner.

Goats can easily access hilly terrain, and their grazing is used to control vegetation to prevent wildfires in areas that brush clearing crews can’t easily reach.

Contact Sarah Tan at 510-262-2789. Follow her at Twitter.com/sarahjtan.