Armed police officers enter the Houses of Parliament in London after gunfire was reported nearby.

Injured people are assisted after an incident on Westminster Bridge in London.

A “marauding” terrorist struck the heart of London on Wednesday, killing three people — including a cop — in a rampage outside Parliament that ended when he was gunned down by police.

Prime Minister Theresa May called the attack, which injured at least 40 more people on the one-year anniversary of the Brussels suicide bombings, “sick and depraved.”

“The location of this attack was no accident,” she said outside her 10 Downing St. office Wednesday evening.

“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.”

Authorities believe the unidentified attacker was operating alone and was inspired by “Islamist-related terrorism,” said Mark Rowley, the head of counter-terrorism at the Metropolitan Police.

The slaughter in the shadow of Big Ben, which police called a “marauding terrorist attack,” began around 2:40 p.m. local time, when the killer used a gray Hyundai i40 to plow into more than a dozen pedestrians on the Westminster Bridge.

“I heard a wheel definitely hit a curb, quite a loud crunch noise. I looked up and saw a car clearly hitting people as it came towards me,” pedestrian Rob Lyon, 34, told the Guardian.

“I instinctively jumped off the pavement. I could see people being hit. And then the car just carried on up the bridge and I just looked around and was really in shock.”

Officials said three people were killed on the bridge, including a woman who was found under the wheel of a double-decker bus.

As pedestrians fled for their lives, the attacker continued driving, crashing his car into a railing outside the Palace of Westminster, where the House of Commons was in session.

The black-clad killer, who was armed with two knives, then got out and ran through gates leading to the Parliament complex.

He fatally stabbed unarmed officer Keith Palmer, 48 — and was gunned down by police as he targeted another cop.

“The policeman fell over on the ground and it was quite horrible to watch and then having done that, he disengaged and ran toward the House of Commons entrance used by MPs [members of Parliament] and got about 20 meters or so when two plain-clothed guys with guns shot him,” described Daily Mail reporter Quentin Letts, who watched the carnage from his office in the Parliament building.

Foreign Minister Tobias Ellwood sprang into action and gave Palmer CPR, but ultimately couldn’t save him.

“He was someone who left for work today expecting to return home at the end of his shift and he had every right to expect that would happen,” police boss Rowley said.

The House of Commons session was immediately suspended, and the complex was put on lockdown as May was whisked away in a car to her office, where she was briefed on the attack throughout the afternoon, according to the Guardian.

Police and ambulances descended on the busy area of central London, and by the end of the day, authorities said at least 40 people had been injured, including two who were standing by the railing outside Parliament.

The bridge was a scene of carnage and chaos, with photos showing shocked and bloodied survivors lying on the ground as bystanders jumped in to help.

“I thought it was a road accident,” witness Steve Voake, 55, told NBC News. “There was lots of panic and confusion. Then I saw a shoe on the ground. I saw one body on one side of the road and one body face down in the water with blood all around it.”

Among the injured were three teenage schoolchildren visiting from France and three cops who had just attended a commendation ceremony, officials said.

One woman believed to have fallen from the bridge was pulled out of the River Thames with serious injuries, while another man was found on a lower platform surrounded by blood.

“A female member of the public was recovered from the water near Westminster Bridge,” a spokesman for the Port of London Authority said. “She is alive but undergoing urgent medical treatment on a nearby pier.”

Colleen Anderson, a junior doctor at St. Thomas Hospital, said the injuries she saw ranged from “minor” to “catastrophic.” One man, a police officer in his 30s, suffered a head wound, she said.

Two Romanians and a couple of South Korean tourists also were among the injured, according to reports.

Rowley called it “a day we’ve planned for but hoped would never happen.”

“Sadly it’s now a reality,” he said.

The White House said President Trump called May to show his support and “offer his condolences” for the terror attack.

“[Trump] pledged the full cooperation and support of the United States Government in responding to the attack and bringing those responsible to justice,” a White House statement said.

London Mayor Sadiq Khan said, “We stand together in the face of those who seek to harm us and destroy our way of life. We always have, and we always will. Londoners will never be cowed by terrorism.”

May said Parliament would “meet as normal” on Thursday morning.

“We will come together as normal,” she said. “And Londoners — and others from around the world who have come here to visit this great city — will get up and go about their day as normal.”

“Never giving in to terror,” she added. “And never allowing the voices of hate and evil to drive us apart.”

The terror attack is the deadliest in London since 2005, when four suicide bombers detonated explosives on subway trains and a double-decker bus, killing 52 people and injuring 700.

Exactly one year ago Wednesday, suicide bombers in Brussels staged coordinated attacks that left 32 people dead, including the three attackers.

With Post wires