The prime minister says he is “appalled and sickened” by the stabbing attack in Reading that left three people dead.
Police arrested a 25-year-old man from Reading at the scene and say they are not looking for anyone else over the “terrorist incident”.
Boris Johnson has paid tribute to unarmed officers who detained the suspect, after he had also injured three other people.
And the PM promised action “if there are lessons that we need to learn”.
Mr Johnson said: “I’m appalled and sickened that people should lose their lives in this way and our thoughts are very much with the families and friends of the victims today.”
He said he had spoken to the chief constable of Thames Valley Police and praised the bravery of his officers, during the attack at Forbury Gardens, a park in Reading town centre.
“If there are lessons that we need to learn about how we handle such cases, how we handle the events leading up to such cases then we will learn those lessons and we will not hesitate to take action when necessary,” Mr Johnson said.
He said that included changes to the law, as they had done over the automatic early release of terrorist offenders.
Metropolitan Police Assistant Commissioner Neil Basu, head of counter-terrorism policing, said: “This was an atrocity.”