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.