Five people have been injured in a knife attack at the Arndale Centre in Manchester.
A man, aged 40, initially arrested on suspicion of terror offences, has been detained under the Mental Health Act.
Three people were stabbed and two others were hurt when a man with a large knife started "lunging and attacking people", according to police.
He chased two police community support officers (PCSOs) before being detained, the force said.
Greater Manchester Police (GMP) believe he was acting alone.
The force said the man had been assessed "by specialist doctors".
Investigations into the motives behind the attack are continuing.
One witness said they saw a man "running around with a knife lunging at multiple people", while another described people "screaming and running".
The centre was put on lockdown as officers confronted the attacker, with some shoppers taking refuge in stores.
A shop worker, who only gave his name as Jordan, 23, said: "A man was running around with a knife lunging at multiple people, one of which came into my store visibly shaken with a small graze.
"Soon after, security staff told all retail staff to close their doors and move the public to the back of the stores."
Speaking at a press conference, Assistant Chief Constable Russ Jackson said it was a "random" and "brutal" attack.
ACC Jackson said a man armed with a knife entered the Exchange Court area of the centre before he "lunged" at shoppers and began "attacking people with the knife".
"Two unarmed police community support officers were in Exchange Court and attempted to confront the attacker.
"He then chased them with the knife as they were calling for urgent assistance."
Within five minutes armed officers detained the suspect on Market Street outside the centre, he added.
In a tweet, Prime Minister Boris Johnson said: "Shocked by the incident in Manchester and my thoughts are with the injured and all those affected."
Shocked by the incident in Manchester and my thoughts are with the injured and all those affected. Thank you to our excellent emergency services who responded and who are now investigating what happened.— Boris Johnson (@BorisJohnson) October 11, 2019
Three people were taken to hospital, a fourth later went for treatment for a "superficial" injury and a fifth person did not require hospital treatment, GMP said.
The force previously said two women, including a 19-year-old, were in a stable condition in hospital, while a man in his 50s was being treated in hospital for stab wounds.
One patient suffered "serious" injuries, North West Ambulance Service said.
Freddie Holder, 22, from Market Drayton, Shropshire, said he heard "a load of screams just outside" the shop he was in.
He said a woman then came into the shop and told others "a guy just ran past the shop and tried to stab me".
He added: "I'm still kind of in shock from it, I'm shaking a little bit... all shops had been locked down just for safety.
"The police arrived extremely quickly, which was very lucky."
Feroze Bilal said he saw "every single shop" in the centre "start closing down", before police evacuated the building.
"People were screaming and running," he added.
A large number of officers were called to the scene, one of whom was seen with a Taser.
The suspect was arrested on suspicion of the commission, preparation and instigation of an act of terrorism.
Deputy Mayor of Greater Manchester Bev Hughes praised the emergency services.
I want to praise Greater Manchester's emergency services for their swift and professional action. Our thoughts are with the five people injured.— Bev Hughes (@DeputyMayorofGM) October 11, 2019
The scene has been secured and all emergency services are engaged in ensuring public safety - the investigation is ongoing. https://t.co/FkBac3gHYC
Labour councillor Pat Karney, for Harpurhey and Collyhurst, tweeted: "Armed police on guard. Shocking scenes right out of a movie but real people with injuries."
The Arndale Centre is located close to Manchester Arena, where 22 people died in a terror attack in May 2017 when a bomb was detonated at the end of an Ariana Grande concert.
The shopping centre was also damaged in a major IRA bomb in 1996.
More than 200 people were injured when the 1,500kg (3,300lb) device left on a lorry on Corporation Street exploded.