“Basically, the places these people are coming from are the places with the highest homicide rates,” said Manuel Orozco, a senior fellow at the Inter-American Dialogue, a Washington-based research group. “The parents see gang membership around the corner. Once your child is forced to join, the chances of being killed or going to prison is pretty high. Why wait until that happens?”

A confluence of factors, including discounted rates charged by smugglers for families, helped ignite the boom, he said. Children are killed for refusing to join gangs, over vendettas against their parents, or because they are caught up in gang disputes. Many activists here suggest they are also murdered by police officers willing to clean up the streets by any means possible.

In the case of the Castellanos family, the police said the older boy was a lookout for the gang and had decided to quit. The order to kill him, the police said, came from prison.

Several arrests have been made. Héctor A. Medina, 47, who the police said lived at an abandoned house controlled by the 18th Street gang, where Kenneth was killed, was charged in the boys’ deaths. “It’s a serious social problem: any children born in this neighborhood are going to get involved in a gang,” said Elvin Flores, a police inspector in charge of La Pradera. “Our idea is to lower crime every day. We need a state policy to involve kids from when they are little to go to school.”

But gangs, which rob, sell drugs locally, kidnap people and extort money from businesses, often recruit new members at schools.

In some cities, blocks are empty because gangs demanding extortion payments have forced out homeowners. Many people have had to move within the country in a displacement pattern that experts liken to the one seen in Colombia’s civil war.