A family taking photos with sparklers during a sunset hike sparked a fast-moving fire Thursday night, investigators said.

>> Read more trending news

It took fire crews about a half-hour to contain the blaze, which had spread along popular hiking trails and threatened a pump house that supplied water to neighboring communities, KCRA reported.

"We had flame heights about 3 to 5 feet," Rocklin Fire Department Battalion Chief Martin Holm told KCRA. "But we had down-canyon winds that was helping move the fire a little faster than it would normally."

Investigators said the family was not charged because the fire was not intentionally lit.

"Giving sparklers to the young kids in an area where it's high, dry grass was probably not the right choice," Holm told KCRA. "Even though those sparklers are deemed safe for kids to handle, they're still hazardous."

Rocklin city code restricts the use of sparklers but allows them June 28 to July 4 and says they can only be set on private property, KCRA reported.