A man admitted during court proceedings on Wednesday to killing 19 residents and injuring dozens more in a knife rampage at a care home for mentally disabled people near Tokyo in 2016, but his defense said that he could not be held criminally responsible for his actions.

Satoshi Uematsu, 29, voiced his "deep apologies to everyone" during the first court hearing at the Yokohama District Court, while his defense team argued he should not be held responsible as he was either mentally incompetent or had diminished capacity.

The hearing was briefly suspended as Uematsu tried to bite off his right little finger immediately after apologizing. It was resumed later in the day without the defendant after he was removed from the courtroom, where he stayed only for about 15 minutes.

According to the indictment, Uematsu, a former employee of the care home, stabbed 19 people to death and injured 24 others at Tsukui Yamayuri En in Sagamihara, Kanagawa Prefecture, in the early hours of July 26, 2016.

He is also accused of hurting two employees of the facility by binding them to handrails in a corridor of the building.

During the hearing, prosecutors said that the defendant started to think after working at the facility that residents of the care home created misfortune and that it was better to kill people with disabilities.

Uematsu's defense team said he was not in the state of his true self as he had a mental disorder triggered by marijuana use since 2013, insisting another personality caused the incident.

The defense said drug use changed Uematsu's personality, citing a conversation he had with a friend around December 2015 as an example.

Uematsu told the friend that he was a "chosen one" and a "legendary leader."

But the prosecutors argued his mental state at the time of the crime fell within the scope of normalcy, and the influence of his marijuana use was limited as it only strengthened his determination for the crime and hastened the timing of the attack.

Expert opinions on his mental competency are expected to be the focus of his trial, being held under the lay judge system. A ruling is expected to be handed down on March 16.

The fatal stabbing rampage targeting socially vulnerable individuals as well as discriminatory remarks made by Uematsu against people with disabilities shocked Japanese society.

During an interview with Kyodo News last month, Uematsu said he continues to believe that "those who have disabilities, severe enough as to prevent communication, are not people." He also said they bring "misfortune" and are "harmful."

He was diagnosed with narcissistic personality disorder through a forensic mental health assessment during the investigation, leading the prosecutors to judge he can be fully held criminally responsible.

Wednesday's hearing proceeded in an unconventional manner as special measures were taken to protect the anonymity of victims' family members, with partitions surrounding the section where they were sitting.

Also, the names of almost all victims will be withheld throughout the trial as the criminal procedure law allows for the confidentiality of victims during trials, upon their request.

Presiding Judge Kiyoshi Aonuma explained that the names, addresses, and birth dates of victims will not be disclosed in the trial with the exception of only one victim.

Before the start of the court hearing, a mother who lost her 19-year-old daughter in the attack sent a letter to the press, revealing her daughter's first name, Miho.

"I was proud of her as she had a lovely smile and was so adorable," she said.

According to the mother, Miho was autistic and did not speak, but was friendly and good at getting along with others.

"Miho was living her life to the fullest, and I would like to leave proof for that. I want the name Miho to be remembered," she wrote.

A recent survey by Kyodo News found differing views among familiy members of victims of the incident and of residents there over maintaining anonymity in the trial.

Two of four bereaved family members among the 25 respondents said they wished to stay anonymous, while the other two did not give responses to that question.

One of the respondents said revealing names "is frightening, as we may face discrimination."

Of the remaining 21 respondents, who included family members of the injured as well as residents not involved in the attack, nine supported anonymity, and eight opposed it.

Related coverage:

Families, survivors of mass murder at care home mark 2nd anniversary