YOKOHAMA - A court Friday granted a request by prosecutors to conduct a psychiatric examination on a man who was arrested after randomly attacking passengers with a machete on a crowded shinkansen train last month, killing one man and injuring two women.

Ichiro Kojima, 22, will be evaluated for mental competency for about four months to see whether he can be held responsible for his actions, according to prosecutors.

Since he hinted at suicidal thoughts, and his explanations of the incident often did not make sense during the investigation, prosecutors considered filing a request for the psychiatric examination, investigative sources had said earlier.

The attack has revived debate about security onboard shinkansen trains.

At around 9:45 p.m. on June 9, Kojima attacked two women in their 20s in the No. 12 car of the 16-carriage bullet train as it was traveling between Shin-Yokohama and Odawara stations in Kanagawa Prefecture near Tokyo, according to investigators.

The train started its journey at Tokyo Station, and its final stop was scheduled to be Shin-Osaka Station.

Kotaro Umeda, a 38-year-old company employee, tried to stop the attacker but was stabbed by Kojima and later died.

Police arrested Kojima at the scene, and he was served with another arrest warrant on June 29 for the attempted murder of the two women.