London (CNN) A man who was arrested outside Buckingham Palace was armed with a 4-foot sword and shouted "Allahu akbar" (God is greatest, in Arabic) as he struggled with officers, London's Metropolitan Police said Saturday.

Counterterrorism officers are investigating the incident, which occurred about 8:30 p.m. (3:30 p.m. ET) Friday. Three unarmed police officers suffered minor injuries as they detained the 26-year-old man, police said. Two were treated at a hospital for cuts.

The man drove his car at a police van and stopped in front of it in a restricted area near Buckingham Palace, police said.

"As they challenged the driver, who was the only occupant in the car, he reached for what we now know to be a 4-foot sword which was in the front passenger foot well," a police statement said.

"The officers acted very quickly to detain him. During a struggle the three officers sustained minor injuries. The man, who repeatedly shouted Allahu Akbar, was incapacitated with CS spray."

An aerial view of Buckingham Palace from 2008 shows the roads in front of the building.

Police: Man likely 'acting alone'

The suspect was arrested at the scene on suspicion of grievous bodily harm and assault on police, and on provisions under the Terrorism Act, police said. He received hospital treatment for minor injuries before being taken to a central London police station for questioning.

"I would like to pay tribute to the bravery and professionalism of these officers who quickly brought this incident under control. Their vigilance, courage and the swiftness of their response demonstrates how our officers are protecting the public at this time," said Cmdr. Dean Haydon, head of the Met's Counter Terrorism Command.

"We believe the man was acting alone and we are not looking for other suspects at this stage. While we cannot speculate on what the man was intending to do -- this will be determined during the course of the investigation -- it is only right that we investigate this as a terrorist incident at this time."

The suspect, who was driving a blue Toyota Prius, is from the Luton area, north of London. Police were carrying out searches there Saturday.

Queen Elizabeth II is currently at Balmoral Castle, her holiday residence in Scotland, palace officials said. Buckingham Palace, the monarch's official residence, is a major London tourist attraction.

No one else was reported injured and no members of the public came into contact with the suspect, police said.

The UK terror threat level is currently severe, the second-highest level, meaning an attack is highly likely.

There have been four terror attacks this year in Britain -- one in Manchester and three in London.

"As the police have said, this is a timely reminder that the threat from terrorism in the UK remains severe," London Mayor Sadiq Khan said in a statement Saturday. "The police, together with the security services, are doing everything they can to protect the public."

UK Prime Minister Theresa May praised the police response via her official Twitter account Saturday. "I want to thank the officers who acted quickly and bravely to protect the public last night, demonstrating the dedication and professionalism of our police," the tweet said.

Police appeal for video, images

Witness Kiana Williamson told the British Press Association news agency that the whole incident lasted only about a minute.

"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," she said.

"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."

Police appealed for anyone who may have witnessed the incident or taken video or photographs to get in touch.