A man wearing a fake explosive vest stabbed several people Friday in London, killing two in what police are treating as a terrorist attack before being tackled by members of the public and then fatally shot by officers on London Bridge.

Police said the attacker was Usman Khan, a 28-year-old who was released on probation last year after serving six years for terrorism offences.

Metropolitan Police Chief Cressida Dick said two stabbing victims had died and three injured people were being treated in hospitals after the attack, which unfolded just yards from the site of a deadly 2017 van and knife rampage.

Health officials said one of the injured was in critical but stable condition, one was stable and the third had less serious injuries.

Police said Khan was convicted in 2012 of terrorism offences and released in December 2018 "on licence," which means he had to meet certain conditions or face recall to prison. Several British media outlets reported that he was wearing an electronic ankle bracelet.

Basu said Khan was attending a London event hosted by Learning Together — a Cambridge-based organization that works to educate prisoners — when he launched the attack, killing a man and a woman and injuring three others.

People are seen fleeing near the scene of the stabbings on Friday. (Dominic Lipinski/PA/The Associated Press)

The attacker's history will raise difficult questions for Britain's government and security services. Neil Basu, the London police counterterrorism head, said police were not actively looking for any other suspects.

Prime Minister Boris Johnson said he had "long argued" that it was a "mistake to allow serious and violent criminals to come out of prison early."

"It is very important that we get out of that habit and that we enforce the appropriate sentences for dangerous criminals, especially for terrorists, that I think the public will want to see," he said.

Johnson, who chaired a meeting of the government's COBRA emergency committee late Friday, said more police would be patrolling the streets in the coming days "for reassurance purposes."

Mayor praises 'breathtaking heroism' of civilians

The violence erupted less than two weeks before Britain holds a national election. The main political parties temporarily suspended campaigning in London as a mark of respect.

Basu said the suspect appeared to be wearing a bomb vest but it turned out to be "a hoax explosive device."

Dick, the police chief, said officers were called just before 2 p.m. to Fishmongers' Hall, a conference venue at the north end of London Bridge. The pedestrian and vehicle bridge links the city's business district with the south bank of the River Thames.

Learning Together was holding a conference there on Friday. The University of Cambridge said it was "gravely concerned" about students, staff and alumni who might have been caught up in the attack.

Minutes after the report of the stabbings, witnesses saw a man with a knife being wrestled to the ground by members of the public on the bridge before armed-response officers shot him dead.

Video images showed people spraying the fleeing suspect with a fire extinguisher, while another passerby held what appeared to be a long white stick. Witness Amy Coop, who was at the Fishmongers' Hall, said it was a narwhal tusk the man had grabbed from a wall before going to confront the attacker.

One video posted on social media showed two men struggling on the bridge before police pulled a man in civilian clothes off a black-clad man on the ground. Gunshots followed. Another depicted a man in suit and overcoat holding a long knife that apparently had been taken from the attacker.

Watch: Man with knife wrestled to the ground (WARNING: Graphic content)

Knife-wielding man wrestled to ground, bystander backs away holding weapon believed to be the attacker's. 0:39

Other images showed police, guns drawn, pointing at a figure on the ground in the distance.

Karen Bosch, who was on a bus crossing the bridge, said she saw police "wrestling with one tall, bearded man" and then heard "gunshots, two loud pops."

She said the man "pulled his coat back which showed that he had some sort of vest underneath, whether it's a stab vest, or some sort of explosive vest. The police then really quickly moved backwards away."

Another bus passenger, Amanda Hunter, told the BBC that the vehicle "all of a sudden stopped and there was commotion and I looked out the window and I just saw these three police officers going over to a man."

Police are seen near the scene of the stabbings on London Bridge on Friday. (Kirsty O'Connor/PA via AP)

"It seemed like there was something in his hand, I'm not 100 per cent sure, but then one of the police officers shot him."

Rob Underwood told CBC Radio's As it Happens he and his wife were eating at nearby Borough Market when chaos ensued.

"One minute you're sitting there in a very, very packed eating area ... the next minute it was almost empty," he recalled. "People were just diving for cover under tables, and there were armed police saying, 'Just get out.'

"It was very scary."

Police confirmed that the man died at the scene.

The mayor praised the "breathtaking heroism of members of the public who literally ran towards danger not knowing what confronted them."

"They are the best of us," Sadiq Khan said

The prime minister also praised the bystanders, and said anyone who was involved in the attack "will be hunted down and will be brought to justice."

'We will not be cowed by those who threaten us'

Cars and buses on the busy bridge stood abandoned after the shooting, with a white truck stopped diagonally across the lanes. Video footage showed police pointing guns at the truck before moving to check its container.

London Bridge station, one of the city's busiest rail hubs, was closed for several hours after the attack.

Scores of police, some armed with submachine guns, ushered office workers and tourists out of the area packed with office buildings, banks, restaurants and bars. Staff in nearby office blocks were told to stay inside.

Watch: Police converge on London Bridge

Popular area immediately cordoned off and British rail hub closed to traffic 0:43

As police cleared the streets, staff in shops and restaurants ushered customers into storerooms and basements. Some had been through similar traumatic events in June 2017, when eight people died in the van and knife attack launched by three people inspired by the Islamic State group. The attackers ran down people on the bridge, killing two, before fatally stabbing several people in nearby Borough Market.

That fatal attack took place days before a general election. Brits are due to go to the polls again on Dec. 12.

Political leaders expressed shock and sorrow at Friday's attack.

A forensics officer is seen near the site of the stabbings at London Bridge. (Peter Nicholls/Reuters)

"We will not be cowed by those who threaten us," Labour Party Leader Jeremy Corbyn said. "We must and we will stand together to reject hatred and division."

Both Labour and the Conservatives suspended campaigning in the city after the attack and the prime minister was also cancelling political events for Saturday.

Security officials earlier this month downgraded Britain's terrorism threat level from "severe" to "substantial," which means an attack is seen as "likely" rather than "highly likely." The assessment was made by the Joint Terrorism Analysis Centre, an independent expert body that evaluates intelligence, terrorist capability and intentions.

The U.K.'s terror threat was last listed as "substantial" in August 2014; since then it has held steady at "severe," briefly rising to "critical" in May and September 2017.