Two police officers have been injured after tackling a man who had a large knife outside Buckingham Palace, Scotland Yard said.
The suspect, believed to be in his early 20s, was said to have stopped his car near a police vehicle on the Mall roundabout at around 8.35pm.
Spotting the weapon, officers attempted to detain him and received "minor injuries" to their arms, the Metropolitan Police said.
He was arrested on suspicion of grievous bodily harm and assault on police and is was being treated for minor injuries at hospital, according to the force.
Police said it was too early to know whether the incident was terror related.
It is understood that no members of the Royal Family were in Buckingham Palace at the time.
Witness Kiana Williamson told the Press Association: "We turned up and there was one police van and one car, there was also a civilian's car that had veered towards the police car.
"They were trying to get the man out of the car, shouting, more police were arriving on to the scene and the man was fighting back.
"I saw one injured policeman with an injury to his arm although it didn't look severe.
"He was being tended to by another officer.
"The man had been restrained and looked almost unconscious by the side of the road.
"I didn't see the car driving but the car had been left at the side of the road and an eyewitness had said that he had driven towards the police car.
"The whole encounter lasted around one minute."
Another passer-by, who asked not to be named, said her partner had seen the weapon, which he initially thought was a sword.
She said: "Something happened before which is why the people ran away. I'm not sure what this was.
"But people were already scared and I saw the policeman pull the man from the car.
"The police didn't just run up to the car. There was some shouting prior to this, I couldn't tell you what, I was a bit panicked, then I went to the small crowd as this seemed the safest place to be, on the memorial.
"My partner saw a sword, which I didn't see, as well as a policeman with blood on him, looking like his hand or chest was injured.
"The police officer had it in his hand, walking away with it."
London Ambulance Service attended to treat the injured officers, who were not taken to hospital.
No other people were injured.
Armed police patrolled the entrances to the palace where several police cars and at least two ambulances could be seen.
People filed out of the affected area, saying they had been directed to leave.
An American couple outside the palace, who did not give their names, said they saw a car being searched by officers.
Witness Nicole Kyle was walking home when she saw armed police swoop on the scene and quickly put up a cordon.
The 25-year-old consultant said: "I was walking toward The Mall and St James's Park when I saw police rush down toward the palace in great numbers.
"As we got further down The Mall we saw armed police outside a police van, at which point we were able to walk closer to the palace still, where we were eventually stopped by a cordon."
Police tape closed the entrances at both Buckingham Gate and at Wellington Arch.
Birdcage Walk and The Mall - the roads running around St James's Park - remained taped off.
People were seen walking out of the cordons, but no-one was allowed in.
Several pairs of armed officers were seen stationed at checkpoints around the palace.
Detective Superintendent Guy Collings paid tribute to the "quick and brave" actions of the officers.
He said: "A man in his mid-20s has been arrested by police after they spotted a weapon inside his car.
"The quick and brave actions of both officers meant that the suspect was detained very quickly.
"No members of the public had any interaction with this individual at the scene. He will now be questioned by detectives in police custody. It is too early in this investigation to speculate any further."