TAIPEI, Taiwan (AP) — The apparently random decapitation of a 3-year-old girl in front of her mother in low-crime Taipei this week has sparked outrage, calls to save the death penalty and questions about the island's state of mental health care.

The attack on the child, who was walking behind her mother on the way to a metro station, has stunned and horrified inhabitants of greater Taipei, with the reaction at times verging on violence. Hours after the girl was killed, a crowd gathered outside the police station where the slaying suspect was taken, some of them armed with baseball bats.

"I can't accept this," said Chiu Yuan-chao, Taipei mother of a 9-year-old, said in a telephone interview. "This kind of person shouldn't be allowed to enjoy the treatment of a normal person. I think all moms and dads will have this kind of view. This sort of incident is becoming something of a trend and my feeling is that the society is amid some sort of panic."

Police arrested Wang Ching-yu, 33, who they suspect killed the child. He had been was hospitalized for treatment in 2010 and 2014 after arguing with his family because of an unspecified mental illness, Central News Agency said, citing police.

Authorities have not said whether mental illness was a factor in the attack or whether Wang had been clinically diagnosed with any mental illness.

City dwellers largely still consider the metro area of 5.6 million to be safe. Murders across the island have fallen from 1,765 cases in 1995 to 474 in 2014, statistics from the National Police Agency show.

But the attack triggered debate about whether to keep the death penalty as a deterrent against violent crime. Legislators have been discussing reforms to the punishment, which had been effectively suspended from December 2005 to May 2008. Thirty-three people have been executed since 2008.

About 80 percent of Taiwanese support capital punishment, according to the Taiwan Alliance to End the Death Penalty.

"We need a deeper discussion, not just keep or drop the death penalty, but a more complete system," alliance Executive Director Lin Hsin-yi said Thursday. "If we let a criminal out of jail, will he do more bad things? We need to talk about that."

The girl's killing was among several cases of random violence in recent years that have raised concerns about crime and the city's ability to provide adequate mental health support.

A day after the slaying, a police officer was stabbed at a metro station, again apparently at random. Last year, an 8-year-old girl was killed on an elementary school campus by a man who local media said heard voices. In 2014, a man killed four people in Taipei's ever-crowded metro system.

In each instance, the attackers were characterized as suffering from mental disorders. The man convicted of killing passengers on the subway at age 21 was sentenced to death last year.

The attack has also raised questions about potential inadequacies in the island's mental health services. Lin Wan-i, an incoming official of the president-elect's administration, told local media that the suspect had not been properly diagnosed and observed before being discharged.

Since Monday, many people in Taiwan, including a local official overseeing a Taipei borough, have called for hospitalizing severely mentally ill people in hospitals.

But Pan Chun-hung, director the Department of Addiction Science with Taipei City Hospital, said Taiwan needs to raise the public's overall awareness of mental health issues. Some people may have difficulty recognizing mental illness in themselves and others or are unaware that treatment is available, he said. Strangers should not fear the mentally ill as "most have no antisocial traits," he said.

"When things happen there's a bit of panic and a reaction that people should be quarantined," Pan said. "But our medication is advanced and people can be treated effectively. We hope eventually, if people know more, they won't feel so panicked."

Tsai Ying-wen, Taiwan's president-elect, said Wednesday that Taiwan's future head of police will need to devise "specific strategies and activities" to boost public safety.

"Facing the innocent sacrifice of a child, we can't just be angry and sad," she said in a statement. "Our responsibility is to give every father, mother and child a life that's free of fear."