SUMTER, S.C. (AP)  A 12-year-old boy trick-or-treating with his family on Friday was shot from inside a home and killed, and his father and brother were wounded by the gunfire, the authorities said.

A suspect in the shootings, Quentin Patrick, was in custody, a jail official said. Mr. Patrick, 22, has been charged with murder and three counts of assault and battery with intent to kill. The jail official said she did not know whether Mr. Patrick had a lawyer, and his telephone number was unpublished.

The family was headed home from a city-sponsored event here, when they decided to stop at a few homes to trick-or-treat, Police Chief Patty Patterson said. The father and his four children approached a home with a porch light on about 8:30 p.m., while their mother waited nearby in a vehicle.

At the door, family members said they thought they heard fireworks. The 12-year-old boy, his father and brother were all hit by the gunfire. The boy died at a hospital, Coroner Verna Moore said. The other two children were not hurt.