There had been reports that the man was wearing an explosive device, Mr. Basu said, but the police determined that it was “a hoax explosive device” strapped to his body.

“What’s remarkable about the images we’ve seen is the breathtaking heroism of members of the public who literally ran toward danger, not knowing what confronted them,” said Mayor Sadiq Khan of London. It was not clear if the passers-by saw the phony device and decided to tackle the man anyway.

On Friday evening, the police reported that two people died after being stabbed, and that three others had been injured.

The Metropolitan Police said that around 2 p.m., they responded to reports of a knife attack in Fishmongers’ Hall , a grand Greek Revival building that sits just at the north end of London Bridge and is often used for events. On Friday, a criminal justice group whose members are former Cambridge University academics was meeting there.

“The circumstances, as we currently understand them, are that the attacker attended an event earlier on Friday afternoon at Fishmonger’s Hall called ‘Learning Together,’” said Mr. Basu, the assistant police commissioner, in a statement early Saturday morning. “We believe that the attack began inside before he left the building and proceeded onto London Bridge, where he was detained and subsequently confronted and shot by armed officers.”

A woman who said she was in the hall described an almost surreal scene, posting on Twitter that after the attack began, another man grabbed a five-foot-long narwhal tusk from the wall and used it to confront the attacker .

Later, on the bridge, as the crowd was trying to subdue the assailant, bystanders captured images of a man standing with a long white pole, which the woman in the hall, Amy Coop, said was the narwhal tusk.