The trial of a Japanese man accused of stabbing 19 disabled people to death descended into chaos on Wednesday morning after the defendant appeared to put something in his mouth and fell to the floor while wrestling with court officials.

Satoshi Uematsu is charged with the killings and wounding 26 others in an attack at a care home in 2016 where he had previously worked.

Mr Uematsu’s lawyer had told the court that his client did not dispute the facts of the case, but would plead not guilty because he was not mentally competent at the time of the stabbings due to a “psychiatric disability”.

The 29-year-old defendant, wearing a navy-blue suit, white shirt and a tie, looked calm and bowed slightly when he entered the court in Yokohama.

Stabbing attack outside Tokyo Show all 11 1 /11 Stabbing attack outside Tokyo Stabbing attack outside Tokyo Police officers stand guard outside the Tsukui Yamayuri En care centre where a knife-wielding man went on a rampage in the city of Sagamihara, Kanagawa prefecture, some 50 kms (30 miles) west of Tokyo on July 26, 2016. TOSHIFUMI KITAMURA/AFP/Getty Images Stabbing attack outside Tokyo Broadcast television news relay vehicles are seen parked near the Tsukui Yamayuri En care centre where a knife-wielding man went on a rampage in the city of Sagamihara, Kanagawa prefecture, some 50 kms (30 miles) west of Tokyo on July 26, 2016. TOSHIFUMI KITAMURA/AFP/Getty Images Stabbing attack outside Tokyo A rescue worker stands by beside ambulances near the Tsukui Yamayuri En care centre where a knife-wielding man went on a rampage in the city of Sagamihara, Kanagawa prefecture, some 50 kms (30 miles) west of Tokyo on July 26, 2016. JIJI PRESS/AFP/Getty Images Stabbing attack outside Tokyo Police officers walk outside the Tsukui Yamayuri En care centre where a knife-wielding man went on a rampage in the city of Sagamihara, Kanagawa prefecture, some 50 kms (30 miles) west of Tokyo on July 26, 2016. TOSHIFUMI KITAMURA/AFP/Getty Stabbing attack outside Tokyo Journalists gather in front of the Tsukui Yamayuri En care centre where a knife-wielding man went on a rampage in the city of Sagamihara, Kanagawa prefecture, some 50 kms (30 miles) west of Tokyo on July 26, 2016. At least 19 people were killed when the knife-wielding man went on a rampage at the care centre for the mentally disabled in Japan early on July 26, a fire official said. TOSHIFUMI KITAMURA/AFP/Getty Stabbing attack outside Tokyo Police officers stand guard outside the Tsukui Yamayuri En, a care centre where a knife-wielding man went on a rampage at Sagamihara city, Kanagawa prefecture on July 26, 2016. TOSHIFUMI KITAMURA/AFP/Getty I Stabbing attack outside Tokyo The "Keep Out" tape by police is displayed at the Tsukui Yamayuri En, a care centre at Sagamihara city, Kanagawa prefecture on July 26, 2016. JIJI PRESS/AFP/Getty Images Stabbing attack outside Tokyo Journalists await near the Tsukui Yamayuri En, a care centre at Sagamihara city, Kanagawa prefecture on July 26, 2016. JIJI PRESS/AFP/Getty Images Stabbing attack outside Tokyo A facility for the disabled, where at least 19 people were killed and as many as 20 wounded by a knife-wielding man, is seen in Sagamihara, Kanagawa prefecture, Japan, in this photo taken by Kyodo July 26, 2016. Kyodo via Reuters Stabbing attack outside Tokyo Police officers are seen near a facility for the disabled where at least 19 people were killed and as many as 20 wounded by a knife-wielding man, in Sagamihara, Kanagawa prefecture, Japan, in this photo taken by Kyodo July 26, 2016. Kyodo via Reuters Stabbing attack outside Tokyo A police officer is seen in a facility for the disabled, where a knife-wielding man attacked, in Sagamihara, Kanagawa prefecture, Japan, in this photo taken by Kyodo July 26, 2016. Kyodo via Reuters

Shortly after the proceedings began, however, he appeared to slip something into his mouth, according to reporters present in the courtroom. He then struggled with three uniformed court officers, who held him down on the floor as he writhed about.

The hearing was adjourned for an hour, before recommencing without Mr Uematsu present. It was not clear what he had put into his mouth or what his condition was following the incident.

The stabbings at the care home shocked Japan, which has strict gun laws and rarely experiences mass killings or outbreaks of violent crime.

Mr Uematsu is accused of breaking into the Tsukui Yamayuri-en centre in Sagamihara, a city in the Greater Tokyo conurbation, at 2:30am on 26 July 2016.

Half an hour later, he handed himself over to the police, who found him carrying several bloodstained knives.

Many of those stabbed to death in the facility had knife wounds in the neck. The residents who died during the attack ranged in age from 19 to 70.

Police officers guard the care centre in Sagamihara after the stabbings (Picture: Toshifumi Kitamura/AFP/Getty Images)

Japanese media reported at the time that Mr Uematsu had briefly been committed to a mental hospital earlier in 2016 after he discussed his plans to euthanise severely disabled people if the government gave its permission.

“My goal is a world in which, in cases where it is difficult for the severely disabled to live at home and be socially active, they can be euthanised with the consent of their guardians,” he wrote in a letter to the speaker of Japan’s parliament, Japanese TV reported.

After Mr Uematsu had been removed from the courtroom, one of his lawyers said it had been his use of cannabis that had prompted his mental illness and “turned him into a different person”.

But prosecutors rejected this argument and told the court that Mr Uematsu was aware of what he was doing.

“He had the capacity to tell good from bad, and capacity to control his conduct as well. We will prove he was completely responsible for what he did.”

The trial has also provoked a debate within Japan over the social stigma and shame heaped upon those who suffer from disabilities.

Most of the families of the victims have chosen not to make their names public, but one woman told the national broadcaster NHK that the trial had led her to change her mind about concealing the name of her daughter who was killed in the attack.

The channel broadcast photos of the 19-year-old victim, who had autism and was unable to speak.