"The man - aged in his 30s - was arrested," police said.
A witness at the scene told Reuters the man ran towards one of the gates to parliament where a militant killed a police personnel less than three months ago.
Another witness told Reuters he saw police threatening to use a stun gun on the man. Pictures from the scene showed the man on the ground with an officer pointing a gun at him.
Officers later put the man in the back of a police van, a Reuters reporter said. Parliament said it was aware of the incident.
Seven killed in Chinese kindergarten blast; 59 injured
The gates to parliament were closed and armed police were patrolling as usual inside the perimeter, a Reuters reporter inside the building said.
On March 22, Khalid Masood drove a car into pedestrians on Westminster Bridge, and then stabbed a police personnel to death in the grounds of parliament.
A suicide bombing in Manchester and a deadly attack on London Bridge thrust security and policing to the fore of the campaign before last Thursday's election.
The spate of recent attacks were the deadliest in Britain since four British suicide bombers killed 52 people on the London transport system in July 2005.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ