The suspect in a fatal stabbing spree that saw 19 people killed in Japan had been hospitalised early this year after expressing a willingness to kill disabled people if the government approved, a city official has said.

Police in the town of Tsukui near Tokyo contacted the suspect, Satoshi Uematsu, and he was involuntarily committed to hospital on 19 February after he had tried to present a letter to the speaker of the lower house of Japan's parliament, said an official from nearby Sagamihara city.

Mr Uematsu told police he would kill many severely disabled people if the national government approved such an action, the official told Reuters.

Mr Uematsu was discharged on 2 March after a doctor deemed his condition had improved, the official said.

Nineteen people were stabbed and killed in their sleep and at least 25 wounded at a facility for the disabled in Sagamiharain the early hours of this morning, local time.

Mr Uematsu, a former employee at the facility in Sagamihara town, about 40km southwest of Tokyo, handed himself into police.

Kyodo news agency said the dead ranged in age from 19 to 70 and included nine men and ten women.

The 7.6 acre facility, established by the local government and nestled on the wooded bank of the Sagami River, cares for people with a wide range of disabilities, public broadcaster NHK said, quoting an unidentified employee.

Police at the care centre

Residents of the small town of Sagamihara said the last murder in the area was ten years ago.

A woman who said she used to work at the facility said many patients were profoundly disabled.

Police had recovered a bag with several knives, at least one stained with blood, the Kanagawa prefecture official said.

The facility's website said the centre had a maximum capacity of 160 people, including staff.

Such mass killings are extremely rare in Japan and typically involve stabbings. Japan has strict gun laws and possession of firearms by the public is rare.

Eight children were stabbed to death at their school in Osaka by a former janitor in 2001.

Seven people died in 2008 when a man drove a truck into a crowd and began stabbing people in Tokyo's popular electronics and "anime" district of Akihabara.

A revision to Japan's Swords and Firearms Control Law was introduced in 2009 in the wake of that attack, banning the possession of double-edged knives and further tightening gun-ownership rules.

Members of a doomsday cult killed 12 people and made thousands ill in 1995 in simultaneous attacks with sarin nerve gas on five Tokyo rush-hour subway trains.