LONDON – Armed police carrying out a counterterrorism operation Thursday swooped in on a man they said was carrying knives in a bag near Britain’s Parliament and arrested him on suspicion of planning terrorist acts.

London’s Metropolitan Police said the 27-year-old man was stopped and detained “as part of an ongoing operation” by the force’s counterterrorism unit.

No one was injured in the incident, which unfolded just yards from where an attacker killed five people with a vehicle and a knife last month. It sent a jittery jolt through an area that has been on edge since the March 22 attack.

Police said knives were recovered during the operation and that there was “no immediate known threat” to the public.

The force said the man was being held at a London police station on suspicion of possession of an offensive weapon and on suspicion of the commission, preparation and instigation of acts of terrorism.

As armed police blocked off Whitehall, a street lined with government buildings that is the main artery of London’s government district, witnesses reported seeing and a man on the ground surrounded by police.

Ian Moss, who was traveling on a bus on Whitehall, said the man did not appear to be struggling.

“He had police pointing arms at him though,” Moss said.

A bearded, black-clad man could later be seen standing on the sidewalk, surrounded by police, before being put into a police vehicle.

“I saw the backpack and knives on the floor in the intersection in the middle of Whitehall, and a guy being bundled into the car who I believe was the criminal, and a forensics team,” said Helen Chandler-Wilde, a journalism student.

After the arrest, forensic officers pored over the scene. A black bag and at least three knives could be seen on the ground.

The man was arrested yards from the gates to Downing Street, where the prime minister’s residence is located. Prime Minister Theresa May, who is campaigning in a national election, was not there at the time.

May said the arrest “shows that our police and our intelligence and security are on the alert, as they always are, looking to keep us safe and secure. I think we owe a huge debt of gratitude to these people.”

Thursday was Parliament’s last sitting day before Britain’s June 8 election.

Security has been increased around Parliament after an attacker drove an SUV into pedestrians on nearby Westminster Bridge on March 22, killing four, before stabbing a police officer to death inside the gates of Parliament. The attacker, Khalid Masood, was shot dead by police.

Police believe Masood, 52, a British-born Muslim convert with convictions for violence, acted alone.

Police say there has been a surge in knife crimes in London in the past year.

Britain also faces a threat from international terrorism classified as “severe,” meaning an attack is highly likely.