A man arrested on suspicion of trying to kill a police officer has been detained under the Mental Health Act.
The officer, in his 20s, was attacked with two knives at an address in Basingstoke on Sunday, after he responded to a concern for welfare.
He was treated in hospital for injuries to his head, neck and hands, and is now recovering at home.
Police said a 43-year-old was released from custody but detained under Section 2 of the Mental Health Act.
The man, initially arrested on suspicion of attempted murder, remains under investigation, a spokesman said.