An attack outside Parliament plunged London into turmoil on Wednesday, leaving at least four people dead and 20 injured, and prompting the hasty evacuation of the prime minister in a confusing swirl of violence that traumatized the seat of British power.
The police said they were treating the attack as terrorism, which appeared to make it the most serious such assault in London since the deadly subway bombings more than a decade ago.
Throughout a turbulent afternoon, ambulances, emergency vehicles and heavily armed security officers thronged the area outside Parliament, as one of the busiest sections of London was cordoned off and evacuated. Prime Minister Theresa May was rushed into a vehicle and spirited back to her office, where her aides reported that she was safe.
The attack unfolded around 2:40 p.m., Assistant Commissioner Mark Rowley said at a news conference.
The driver of a large vehicle mowed down pedestrians on Westminster Bridge, which leads to Parliament, killing two people and injuring others, before crashing into a railing.
After the crash, at least one man left the vehicle and approached Parliament, where he stabbed an armed police officer to death and was fatally shot by the police.
“This is the day we have planned for but we hoped would never happen,” Mr. Rowley said. “Sadly, it’s now a reality.”
The attack came on the anniversary of suicide bombings in Brussels that killed 32 people, along with three bombers. The violence raised fears that London, which has been largely spared as a target of recent terrorist attacks, has now joined cities like Paris, Brussels and Berlin as targets of mass violence.
Mrs. May spoke with President Trump, and was scheduled to lead a crisis-response meeting of her cabinet on Wednesday evening.
“A full counterterrorism investigation is underway,” Cmdr. B. J. Harrington of the Metropolitan Police said at a brief news conference, at which he pleaded with members of the public to stay away from a broad section of central London, to report any suspicious activity and to share any images or video of the violence.
Commander Harrington said that the police knew of “a number of casualties, including police officers,” but that he could not confirm a precise figure. He also said that the acting police commissioner, Craig Mackey, was at the scene of the attack and was not injured, but was “being treated as a significant witness.”
At least three police officers were among the 20 people injured. Also among the injured were a group of visiting students from the Brittany region of France, and a woman who fell or plunged into the River Thames.
Tobias Ellwood, a minister in the Foreign Office, tried to save the life of the stabbed police officer by giving mouth-to-mouth resuscitation, but the officer died.
For more than two hours, astonished lawmakers inside the House of Commons, some of whom had ducked for cover, were told to stay in place as officers searched the premises, office by office.
“At the moment, the very clear advice from the police and the director of security in the house is that we should remain under suspension, and that the chamber should remain in lockdown until we’ve received advice that it is safe to go back to normal procedures,” David Lidington, the leader of the House of Commons, or lower house of Parliament, told lawmakers in remarks broadcast live on the BBC.
Olly Grender, a member of the House of Lords, said that lawmakers were staying put. “We were in a meeting, I heard shouting through the window,” she said, adding that a colleague then came in to tell them that a serious incident had taken place.
Jayne Wilkinson, 59, from Birmingham, England, was near the statue of Winston Churchill in Parliament Square with her partner, David Turner, 56, when they saw people suddenly running from Parliament.
The couple said they had seen a middle-aged man holding a knife. He ignored warnings from the police, running though the gates into the compound of Parliament, she said.
“They were shouting to warn him,” Ms. Wilkinson said. Soon after, she and her partner heard three gunshots and saw the man on the ground.
Three construction workers who were inside the grounds of Westminster Palace said they heard shots fired in rapid succession before they were escorted off the premises. “It was bang-bang-bang,” one of them said.
Reuben Saunders, an American student at Cambridge University who was visiting Parliament, said he was on his way out of the building when he saw a police officer being attacked by the assailant.
“He was at the gate, I heard screaming,” Mr. Saunders said, adding that the assailant had two knives or similar weapons. “I saw the man on the ground being repeatedly stabbed, or pummeled,”
“There was another policeman standing by,” he added. “I thought he should have shot, but maybe he was unarmed.”
Mr. Saunders said that two or three other police officers arrived and, at that point, he retreated. “There were two or three gunshots,” he said.
Corinne Desray, a teacher who was outside Parliament with 39 teenage students on a three-day school trip from northern France, said they heard three shots. “My colleague saw bodies lying on the floor and someone said a policeman has been knived,” she said. “I told the kids to leave quickly. We’re heading back to the bus.”
Kirsten Hurrell, 70, who owns a newsstand opposite the clock tower known as Big Ben, said she saw a car swerve across a bicycle lane and into a fence around Parliament. She saw a body lying on the ground and called emergency services. “At first I thought it was an accident but then I was told the car had already mowed down quite a number of people on Westminster Bridge,” she said, adding: “Now that it is a terrorist incident, it is a bit more daunting.”
“I came out of the Tube and there were two armed policemen,” he said in an interview. “One grabbed my arm, pushed me to the left and said, ‘Get out of here,’ ” he said. “They were shouting at everyone to get away.”
As he spoke, police officers were cordoning off the area. One officer shouted, “We need everyone to move back past Downing Street.”
Radoslaw Sikorski, a former foreign minister of Poland who was in the area, was in a taxi on Westminster Bridge when the pedestrians were hit by the other vehicle.
“I didn’t see the impact, I heard it, it sounded like a car hitting a sheet of metal,” he said. “I saw these people lying on the tarmac, on the pavement. I saw five people down, one unconscious and one bleeding heavily from his head. He was not moving. The taxi driver rang the emergency services, and people rushed to help.”
Andrew Bone, executive director of the Responsible Jewellery Council, an industry standards group, was on a bus heading toward Victoria Station when it was stopped at the edge of Parliament Square. Seeing the commotion, he at first assumed that an action movie was being shot, but quickly discerned the gravity of the situation as the bus was evacuated and he saw the vehicle on the bridge, which had crashed a railing, the air ambulance.
“We had a front-row seat as the first responders arrived,” Mr. Bone said. “I am of the generation who remembers I.R.A. bombs in London during The Troubles,” he said, referring to the sectarian conflict in Northern Ireland. “We are not indifferent, but police have reacted with calm. I saw no panic.”
Martin Vickers, a member of the House of Commons, was in a passageway in Parliament when he heard loud noises. He thought a motorcycle was backfiring. But as word spread that shots had been fired, he and dozens of other people were ushered onto the Thames embankment, next to Big Ben. There, he saw the car that had been driven into the railings, and saw wounded pedestrians.
Mr. Vickers, dressed only in a suit and no overcoat, was waiting outside the police cordon to get back to his office. “My keys are in there and without them I can’t go home.”
Britain has not suffered a large-scale terrorist attack since July 7, 2005, when bomb attacks on subway trains and on a bus killed more than 50 people. Political violence is relatively rare in Britain, where gun ownership is seriously restricted.
In 1979, a lawmaker was assassinated near the Parliament building. Airey Neave, a Conservative Party member, was killed when his car was blown up.
Jeremy Shapiro, a former State Department official now at the European Council on Foreign Relations, said that the London attack was consistent with the recent pattern of attacks in which a vehicle was used to kill people, citing attacks in France, Germany and Israel.
“We’ve seen a gradual movement away from terrorist attacks on the West to attacks on softer and softer targets with more improvised weapons,” he said. “In a way, it’s a sign of desperation and a demonstration of the effectiveness of counterterrorism in the West. It’s spectacularly easy to kill a bunch of people with a car or a truck if you don’t care who they are.”
Organized attacks as in Paris are increasingly difficult to pull off, he said, but “the capacity of one person inspired by some ideology to do damage is inescapable.”
It is “a senseless tragedy,” he said, but similar things happen in the United States, too. “And it’s sad also because our societies overreact to it and make it worse,” Mr. Shapiro said.