The 25-year-old man suspected of committing a stabbing attack at a Manchester train station New Year’s Eve whilst shouting “Allah!” and pro-Islamic caliphate slogans is being detained under the mental health act.

The move comes as a result of an assessment by medical staff, police confirmed Tuesday night, but that the terrorism investigation “remains ongoing,” reports The Telegraph.

“The 25 year old man arrested on 31 January 2018 following the incident at Manchester Victoria Station has been assessed by specialist medical staff and detained under the Mental Health Act.

“The Counter Terrorism investigation remains ongoing,” Greater Manchester Police said in a statement.

The suspect, described as being dressed in black and marauding around the station before the attack at around 9pm, stabbed a couple in their fifties and then stabbed a British Transport Police officer who attempted to intervene. The man was believed to have been injured in the stomach whilst the woman was injured in the face and stomach.

Update: New Year's Eve 'Allah!' Stabbing Attack Being Treated as 'Terror Related' https://t.co/VsrjLvA29Q — Breitbart London (@BreitbartLondon) January 1, 2019

Witnesses, including a BBC producer, heard the 25-year-old shouting Islamic State-inspired slogans, including “Allah!,” “Long live the Caliphate,” and “As long as you keep bombing other countries, this sort of shit is going to keep happening.”

Assistant Chief Constable Russ Jackson, of Greater Manchester Police (GMP) said that while the investigation is being handled by the counter-terror unit, officers were “retaining an open mind in relation to the motivation for this attack.”

The train station is part of a complex including the Arena, where in May 2017 the Islamist son of Libyan asylum seekers Salman Abedi detonated a suicide vest, killing 23 people, many of whom were children.

Counter-terror officers searched a house in the north Manchester area of Cheetham Hill Tuesday after police declared the incident to be “terror related.”

A neighbour, Nousha Babaakachel, 40, told the BBC that a family of two parents in their forties with five children live in the house — two sons in university, one son is in Somalia, another son works at Manchester airport, and there is also a daughter.

Both parents had moved to the UK from the Netherlands some 12 years ago and attend the Khiza mosque, the neighbour said.

Former chief constable of Greater Manchester Police Sir Peter Fahy told BBC Radio 4’s Today programme on Wednesday that the suspect being detained under the Mental Health Act does not “stop it from being a terror attack, particularly for the people involved.”

The 19-year-old Mauritanian origin man was arrested at the Eiffel Tower after he drew the knife https://t.co/WzovWZvE5W — Breitbart London (@BreitbartLondon) August 6, 2017

“Obviously the big question is why would somebody who has got a mental illness be inspired or incited or get an idea to carry out an attack, and this is really the nub of the issue.

“What we know is that people who perhaps have an existing problem in their lives – a medical issue, an addiction issue, a mental health issue – are particularly vulnerable to be targeted, to be radicalised, and that is why there is much closer working between police and the mental health agencies [while] always respecting patient confidentiality,” Sir Peter added.

In recent years, several individuals stating or appearing to be Islamic extremists who go on to commit attacks have been labelled or assessed for mental illness, including the Hamburg knife attacker who boasted of wanting to be a terrorist while German police insisted he was mentally ill.