The suspect in the serial killings of nine people in Zama, Kanagawa Prefecture, was indicted Monday on a charge of murdering and dismembering them in his apartment last year after prosecutors determined he was mentally competent enough to be held criminally liable.

The decision about Takahiro Shiraishi’s mental health came after about five months of psychiatric tests. Shiraishi, 27, has admitted to the crimes and is believed to have preyed on people who expressed suicidal thoughts on the internet.

According to the indictment, Shiraishi killed and dismembered eight females and one male ranging in age from 15 to 26 from August to October 2017. The mutilated bodies of the victims, who were from Tokyo and four other prefectures, were found in coolers in his apartment.

Shiraishi allegedly strangled the nine people with rope and stole some of their cash. All eight females had been sexually assaulted, according to the police. He also reportedly borrowed about ¥360,000 from one of the victims.

Shiraishi has been served 10 arrest warrants in connection with the cases. Monday’s indictment covers all of them.

The killings came to light last October when police officers entered his apartment and found several coolers filled with body parts. They were searching for a missing Tokyo woman who turned out to be one of his victims.

Shiraishi has told investigators that he contacted his suicidal victims via Twitter and lured them to his apartment by saying he would help them die, the police said.

Shiraishi also told investigators he committed the murders to steal money and that he “wanted to lead an easy life,” they said.

Prosecutors decided to have him undergo a psychiatric examination before indicting him because his mental state at the time of the crimes is expected to be a focal point of his trial, investigative sources said.

Due to the mass of evidence, his trial is expected to take a long time before a ruling is made, the sources said.

The serial killings shocked the nation, prompting the government and social networking businesses to improve support for young people in despair.

The Education, Culture, Sports, Science and Technology Ministry has decided to financially support counseling projects in 30 municipalities that utilize popular SNS apps like Line.

Nagano Prefecture, which opened consultations via Line for two weeks in 2017, found there were significantly more consultations by this method than through conventional telephone counseling centers, according to the ministry.

“Most of what they talk about concerns human relationships, including romantic relationships,” said Tomoki Miyata, a clinical psychologist who engages in SNS counseling in Osaka. “It enables us to take preventive measures before things get serious.”

The government has vowed to tackle internet-linked crimes by improving education for elementary school students and encouraging private-sector groups to monitor SNS posts related to suicides.

In January, Twitter Japan began allowing users to be linked to a nonprofit organization on suicide prevention work whenever words related to suicide are searched for.