Young bystanders to violent crime can get up to $5,000 in mental health services under a bill signed by Gov. Arnold Schwarzenegger this week.

The new law is a major shift in how the state defines a victim of crime, acknowledging that for children, at least, simply witnessing a violent act can result in trauma-related mental illness.

"I am thankful to the governor for recognizing that children who live in our tough neighborhoods bear the scars of violence they see every day," said Assemblyman Mark Leno, D-San Francisco, who wrote the bill after The Chronicle last year reported widespread post-traumatic stress disorder among youths living in violent neighborhoods.

The legislation, AB2809, allows young bystanders to access funding from the state's Victim Compensation Program. A legislative analysis estimated that 40 children statewide would apply for the funding annually - far fewer than the number who need it, mental health professionals said Wednesday.

The state agency requires documentation - a police or Child Protective Services report, for example - to substantiate that the person is a witness, which may not exist if the child wasn't listed as being at the scene. It also requires victims to cooperate with law enforcement in prosecutions.

In many communities, a mistrust of the legal system and a fear of retribution for cooperating with police keep witnesses from coming forward.

"By the time the police show up, they're not there," Witkin said. "They don't want to be there."

San Francisco District Attorney Kamala Harris, who backed the legislation, described the law as groundbreaking.

"For too many children, seeing shootings or stabbings in their neighborhoods is far too common," she said Wednesday. "Before this law, there was no help."

While the new state law isn't perfect, it's a step in the right direction, said Patricia Van Horn, a UCSF associate clinical professor of psychology. She suggested looking at how other states distribute victim assistance money to make sure the kids who need the services get them.

Leno's bill was signed by the governor late Monday.

To read The Chronicle's special report on post-traumatic stress disorder and its impact on children in a San Francisco neighborhood, go to sfgate.com/ZEPX.