The man who carried out the stab attack at London Bridge on Friday, named by police as Usman Khan, had previously been jailed for terrorism offences.
Khan, 28, was wearing a GPS police tag and was out of prison on licence when he launched his attack, in which a man and a woman were killed and three others were injured.
Khan was shot dead by officers after members of the public restrained him.
The Queen said she was “saddened” by the attack.
She thanked the emergency services “as well as the brave individuals who put their own lives at risk to selflessly help and protect others”.
Police declared the attack a terrorist incident.
Khan was known to the authorities, having been convicted for terrorism offences in 2012. He was released from prison on licence in December 2018, Met Police Assistant Commissioner Neil Basu said.
As part of his release conditions, Khan had to take part in the government’s desistance and disengagement programme – the purpose of which is the rehabilitation of people who have been involved in terrorism.
The Parole Board said it had no involvement in the 28-year-old’s release, saying he “appears to have been released automatically on licence (as required by law)”.
The Times reported that Khan’s release came after he agreed to wear an electronic tag and have his movements monitored.
After leaving prison he had moved into a Stafford property on the “approved premises” list.
The attack began at 13:58 GMT on Friday at Fishmongers’ Hall, at the north end of London Bridge, where a Cambridge University conference on prisoner rehabilitation – called Learning Together – was taking place.
The Learning Together scheme, which featured in the BBC’s Law in Action programme earlier this year, allows university students and prisoners to study alongside each other.
Khan had been one of dozens of people at the event, including students and former prisoners.
Mr Basu said the attack is understood to have started inside the building before continuing onto London Bridge itself, where Khan was shot by armed officers.
Police are carrying out a search, believed to be linked to the attack, at flats in Stafford, close to the town centre.
Staffordshire Police’s Deputy Ch Con, Nick Baker, said it was “vitally important everyone remains alert but not alarmed”.
Mr Basu added police were not actively seeking anyone else in relation to the attack, although they were making “fast time enquiries” to make sure there was no outstanding threat to the public.
The Met Police is urging anyone with information – particularly anyone who was at Fishmongers’ Hall – to contact them.
A man and a woman were killed during the attack. Three others – a man and two women – were also injured and remain in hospital.
NHS chief Simon Stevens said, on Friday, that one person was in a critical but stable condition, another was stable and the third had less serious injuries.
None of those killed or injured has so far been named and officers were still working to identify those who died, Met Commissioner Cressida Dick said on Friday.
The actions of the public have been widely praised, including by Prime Minister Boris Johnson, Labour leader Jeremy Corbyn and Ms Dick, who said they had shown “extreme courage”.
Videos posted on social media appeared to show passers-by holding Khan down, while a man in a suit could be seen running from him, having apparently retrieved a large knife.
One witness described how a man at the event at Fishmongers’ Hall grabbed a narwhal tusk – a long white horn that protrudes from the whale – that was on the wall, and went outside to confront the attacker.
Another person let off a fire extinguisher in the face of the attacker to try to keep him at bay.
One of those who rushed to help during the attack was a convicted murderer who was attending the prisoner rehabilitation event on day release, the Times reported.
James Ford, 42, was jailed for life with a minimum of 15 years in 2004 for the murder of Amanda Champion, a 21-year-old woman with learning difficulties.
Mr Basu said Khan was wearing what was believed to be a hoax explosive device.
BBC security correspondent Frank Gardner said attackers wear fake suicide vests to add to public panic and, in some cases, to ensure police shoot them dead.
To some attackers, martyrdom is preferable to capture, trial and spending many years in prison, our correspondent added.
Prime Minister Boris Johnson put election campaigning on hold on Friday to hold a meeting of the government’s emergency Cobra committee.
Mr Johnson visited the scene at London Bridge on Saturday with Met Commissioner Cressida Dick and Home Secretary Priti Patel.
He praised the “incredible” response by members of the emergency services and the “sheer bravery” of members of the public who intervened.
Mr Johnson said his “immediate takeaway” from the attack was to call prisoners to serve more time in jail.
“When people are sentenced to a certain number of years in prison, they should serve every year of that sentence,” he added.
London Mayor Sadiq Khan he was “in awe of the bravery, the courageousness of ordinary Londoners” who stopped the attacker.
He told BBC Breakfast there would be an increased presence of armed and unarmed police officers in London over the weekend, adding they were there to “reassure us – not because there is an additional or heightened threat”.
The London mayor also told BBC Radio 4’s Today programme the UK had to make sure the “right lessons” were learned from the attack.
“You can’t disaggregate terrorism and security from cuts made to resources of the police, of probation – the tools that judges have,” he said.
But security minister Brandon Lewis told the programme funding for counter-terrorism policing had consistently increased since 2015.
“We will make sure that the police has got the resource that it needs,” he added.
Campaigning ahead of the 12 December general election was expected to continue on Saturday, although the political parties cancelled events due to the attack.
Flags on UK government buildings will fly at half-mast on Saturday as a mark of respect to all those affected by the attack.
The Queen said in a statement: “Prince Philip and I have been saddened to hear of the terror attacks at London Bridge.
“We send our thoughts, prayers and deepest sympathies to all those who have lost loved ones and who have been affected by yesterday’s terrible violence.”
London Bridge was the scene of another attack, on 3 June 2017, in which eight people were killed and many more injured.
The Dean of Southwark Cathedral, the Very Revd Andrew Nunn, said Friday’s events had brought back memories of the 2017 attack.
“It’s only two-and-a-half years since the June attack and that’s not long for healing, and actually it feels as though wounds have been reopened,” he said.
“Where people felt they had come to terms with what had happened in their community, now I think they’re wondering whether they really had – so a lot of work for us to do,” he added.
‘Get off and run’
Witnesses spoke to the BBC about what they saw on Friday.
Amanda Hunter, who was on a bus on London Bridge at the time, said: “All of a sudden [it] stopped and there was some commotion and I looked out the window and I just saw these three police officers going over to a man…
“It seemed like there was something in his hand, I’m not 100% sure. But then one of the police officers shot him.”
Bus driver Mustafa Salih, 62, was travelling from Borough High Street towards London Bridge where he saw emergency vehicles and the police cordon.
He told BBC London: “A police officer came up to me and said ‘turn off your engine, get off and run’.
“I looked up and I could see a crowd of people coming towards me.
“One woman was crying. I ran back down to Borough High Street. It was all very scary as we did not know what was happening.”
This latest attack comes after the UK’s terrorism threat level was downgraded on 4 November from “severe” to “substantial”, meaning that attacks were thought to be “likely” rather than “highly likely”.
The terror threat level is reviewed every six months by the Joint Terrorism Analysis Centre, which makes recommendations independent of government.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: