TOKYO — A day after the worst mass killing in its postwar history, Japan was grappling on Wednesday with why law enforcement and mental health officials were unable to stop a troubled man they had been aware of for months.  Satoshi Uematsu, a 26-year-old former employee of a residence for people with disabilities, confessed to stabbing 19 people to death early Tuesday.  Although the authorities appear to have responded promptly to earlier instances of ominous behavior by Mr. Uematsu, legal specialists, advocates for disabled people and members of the news media are questioning whether those authorities did enough to monitor and treat an apparently troubled man who had advertised his willingness to kill.  “Given that he warned he would commit a crime,” the newspaper Mainichi Shimbun said in an editorial, “there needs to be a thorough examination.”  In February, Mr. Uematsu was briefly committed to a mental hospital after he delivered a rambling letter to a politician in which he threatened to kill handicapped people.  “I can obliterate 470 disabled people,” he wrote in the letter, which was obtained by several Japanese news outlets on Tuesday. The killings, Mr. Uematsu was quoted as saying, would be “for the sake of Japan and the world” and would “prevent World War III.”  Four days after he dropped off that letter, Mr. Uematsu was placed under involuntary psychiatric supervision by order of officials in the city of Sagamihara, where he lived and where the residence for disabled people, Tsukui Yamayuri-en, is located.  In addition to writing the letter, he had told co-workers at the facility, home to about 150 people with mental and physical disabilities, that he thought severely handicapped people should be euthanized, the center’s management said.  Mr. Uematsu spent two weeks in the hospital before two doctors determined that his psychotic symptoms had abated and that it was safe to release him, the authorities said. He was released into the custody of his parents and was supposed to return to the hospital for outpatient treatment, but it appears there was little follow-up.  “There’s nothing in the law that specifies what the city is supposed to do after release,” said Eiji Yagi, director of the welfare department in Sagamihara. The city officials said they did not know whether he had abided by the conditions of his release.  “There’s supposed to be a support plan involving welfare institutions and the community,” said Shota Okumiya, a lawyer who has defended criminal suspects with mental illness. But often, he said, “there’s no budget for it.”  In April, Yamayuri-en installed 16 surveillance cameras after the police suggested the facility strengthen its security. On the night of the attack, in which an additional 26 residents were injured, most of them seriously, eight staff members and a security guard were on duty.  The police say Mr. Uematsu was able to restrain several of his sleeping victims with plastic cable ties before he began methodically slitting their throats.  Hours before the attack, a police car drove up to Mr. Uematsu’s home, a neighbor, Akihiro Hasegawa, 73, said, adding that no one was home at the time. The Japanese media reported on Wednesday that Mr. Uematsu’s car had been found parked illegally, but it is unlikely the police would have gone to his house to deliver a parking summons. City and prefecture police declined to comment on the police visit.  The authorities said Mr. Uematsu had tested positive for marijuana during his hospitalization. The relationship between cannabis use and psychosis has long been debated, but many experts believe the drug can exacerbate the symptoms of people predisposed to schizophrenia and other mental illnesses.  A Japanese television network, TBS, quoted an unidentified childhood friend of Mr. Uematsu’s as saying he continued to smoke marijuana after his release.  Another person who knew Mr. Uematsu told the network that his personality had begun to change late in his college years. This person said that although he was usually friendly and outgoing, he began using synthetic marijuana-like drugs, covered his back in tattoos and showed bouts of aggressive behavior.  “He would say how taking care of disabled people was a waste of money for the country,” TBS quoted the friend as saying.  It is unclear whether Mr. Uematsu ever sought help. Japan has only recently begun to disregard longstanding taboos on discussing mental illness, and experts say the sort of mental health programs widely available to students at universities in the United States and elsewhere remain relatively rare.  After a knife-wielding man killed eight children at a primary school in Osaka in 2001, the Japanese Parliament passed a law expanding mental health treatment for people convicted of violent crimes. But there has been less focus on early diagnosis and prevention, said Nozomi Bando, a social worker and doctoral candidate at Osaka University.  “Especially if the person has turned to drugs, there’s a sense that if you talk to anyone about it, you’ll be kicked out of school at the least,” she said. “Getting counseling is just not something that would occur to most people.”  Osamu Aoki, a journalist and commentator, wrote, “This kind of extreme and unusual case could lead people to brand those with mental illnesses as dangerous, and lead to a shortsighted debate and calls for more preventive measures like involuntary commitment.”  As to Mr. Uematsu’s fitness to work with people with disabilities, some observers pointed out that Japan is chronically short of care workers in facilities for disabled and elderly people, one result of a population that is quickly aging.  With health and welfare budgets strained, however, the need for workers has not done much to push up wages, which are mostly at or near the minimum. That has left many employers little power to be choosy in hiring.  Low-ranking night-shift workers at Yamayuri-en were paid 905 yen an hour, or about $8.60.  Follow Jonathan Soble on Twitter @jonathan_soble.  A version of this article appears in print on July 28, 2016, on page A6 of the New York edition with the headline: In Japan, Questions About Why Officials Could Not Prevent a Knife Attack. Order Reprints| Today's Paper|Subscribe
The man accused of stabbing 19 people to death on Tuesday appears to have slipped through cracks in systems meant to identify mentally ill people and prevent them from harming others.