A 7-year-old who was riding in a car with her mother and three sisters was killed in Texas over the weekend, the authorities said, when a gunman in a pickup truck suddenly pulled up alongside them and opened fire.

The authorities, who said the shooting appeared random and unprovoked, were searching Monday for her killer.

The 7-year-old, Jazmine Barnes, was a second grader at a Houston-area elementary school, and her death — in the family’s car, early one morning over the holidays — unnerved and perplexed her community.

“It’s New Year’s Eve,” Sheriff Ed Gonzalez of Harris County said in an interview on Monday. “It should be a time of fellowship and celebration for many — but not for this family. They have to bury a child.”