LONDON—A knife-wielding man went on a deadly rampage in the heart of Britain’s seat of power Wednesday, plowing a car into pedestrians on London’s Westminster Bridge before stabbing a police officer to death inside the gates of Parliament.

Five people were killed, including the assailant, and 40 others were injured in what Prime Minister Theresa May condemned as a “sick and depraved terrorist attack.”

Lawmakers, lords, staff and visitors were locked down after the man was shot by police within the perimeter of Parliament, just metres from the building itself and not far from the iconic Big Ben clock tower. He died, as did three pedestrians on the bridge, and the police officer.

A doctor who treated the wounded from the bridge said some had “catastrophic” injuries. Three police officers, several French teenagers on a school trip and two Romanian tourists and five South Korean visitors were among the injured.

Police said they were treating the attack as terrorism. There was no immediate claim of responsibility.

Metropolitan Police counterterrorism Chief Mark Rowley said police believed there was only one attacker, “but it would be foolish to be overconfident early on.”

Islamist extremism was suspected in the attack, Rowley said, adding that authorities believe they know the assailant’s identity but would not reveal it while the investigation was ongoing.

The threat level for international terrorism in the U.K. was already listed at severe, meaning an attack was “highly likely.”

“The location of this attack was no accident,” May said Wednesday evening after chairing COBRA, the government’s emergency committee. “The terrorist chose to strike at the heart of our capital city, where people of all nationalities, religions and cultures come together to celebrate the values of liberty, democracy and freedom of speech.”

But she said that “any attempt to defeat those values through violence and terror is doomed to failure. Tomorrow morning, Parliament will meet as normal,” she said.

Londoners and visitors “will all move forward together, never giving in to terror and never allowing the voices of hate and evil to drive us apart.”

U.S. President Donald Trump was among world leaders offering condolences, and in Paris, the lights of the Eiffel Tower were to be dimmed in solidarity with London.

London has been a target for terrorism many times over past decades. Just this weekend, hundreds of armed police took part in an exercise simulating a “marauding” terrorist attack on the River Thames.

Wednesday was the anniversary of suicide bombings in the Brussels airport and subway that killed 32 people last year, and the latest events echoed recent vehicle attacks in Berlin and Nice, France.

Conservative MP Tobias Ellwood, whose brother was killed in the Bali terror attack in 2002, performed first aid on the wounded police officer, who later died. About 10 metres away lay the assailant.

“I tried to stem the flow of blood and give mouth to mouth while waiting for the medics to arrive, but I think he had lost too much blood,” Ellwood said. “He had multiple wounds, under the arm and in the back.”

The attack began early Wednesday afternoon as a driver in a grey SUV slammed into pedestrians on the bridge linking Parliament to the south bank of the River Thames.

Former Polish foreign minister Radek Sikorski was in a car crossing the bridge when he heard “something like a car hitting (a) metal sheet” and then saw people lying on the pavement.

“I saw one person who gave no signs of life. One man was bleeding from his head. I saw five people who were at least seriously injured,” Sikorski told Poland’s TVN24.

Ambulances arrived within minutes to treat people who lay scattered along the length of the bridge. One bloodied woman lay surrounded by a scattering of postcards.

Police said one injured woman was pulled from the river.

The car crashed into railings on the north side of the bridge, less than 200 metres from the entrance to Parliament. As people scattered in panic, witnesses saw a man holding a knife run toward the building.

Loading... Loading... Loading... Loading... Loading... Loading...

“The whole crowd just surged around the corner by the gates just opposite Big Ben,” said witness Rick Longley. “A guy came past my right shoulder with a big knife and just started plunging it into the policeman. I have never seen anything like that. I just can’t believe what I just saw.”

Daily Mail journalist Quentin Letts said a man in black attacked the police officer before being shot two or three times as he tried to storm into the building.

“As this attacker was running towards the entrance two plainclothed guys with guns shouted at him what sounded like a warning, he ignored it and they shot two or three times and he fell,” Letts told the BBC.

The attacker fell just yards from the entrance to 1,000-year-old Westminster Hall, the oldest part of the parliamentary complex, busy with visitors and school groups.

The prime minister was among lawmakers near the Commons at the time of the attack, and was quickly ushered away by security officers and driven back to Downing Street.

The attack unfolded near some of the city’s most famous tourist sites, including the London Eye, a large Ferris wheel with pods that overlook the capital. It was halted after the attack, stranding visitors in the pods, with an aerial view of the attack scene.

London Ambulance Service said medics treated 12 people for serious injuries and eight who were less seriously hurt.

Dr. Colleen Anderson of St. Thomas’ Hospital said some of the wounded had “catastrophic” injuries.

The French Foreign Ministry said that three students on a school trip from Saint-Joseph in the Brittany town of Concarneau were among the injured. Two Romanians were also among the injured, the country’s Foreign Ministry said.

Trump spoke with May by telephone and applauded “the quick response of British police and first responders,” spokesperson Sean Spicer said.

London has often been the target of terrorist attacks, from IRA campaigns in the 1970s and 80s to more recent Islamist plots.

On July 7, 2005, four Al Qaeda-inspired British bombers blew themselves up on three subway trains and a bus in London, killing 52 people.

British security forces say they have thwarted some 13 terror plots over the past four years, but in recent years the U.K. has largely been spared major international terror attacks such as the ones seen in Belgium and France.

Last year, a far-right supporter shot and killed British lawmaker Jo Cox, who had campaigned for the U.K. to remain in the European Union. Prior to that, an attacker claiming to be motivated by Syria stabbed three people at a London subway station.

The most gruesome recent attack occurred in 2013 when two Muslim converts of Nigerian descent attacked Lee Rigby, a British soldier who was walking down the street. The men ran Rigby down with their vehicle and then used a cleaver to hack him to death as bystanders watched in horror.