A man detained outside Buckingham Palace in an incident where three police officers were injured reached for a 4ft sword while shouting “Allahu Akbar”, Scotland Yard has said.

The suspect, who is being questioned by counter-terror detectives, is accused of attacking police outside the Queen’s official residence on Friday night.

Police are treating the attack as an act of terrorism and believe the culprit was acting alone, but said they are keeping an “open mind” over his motives.

Scotland Yard said the incident started shortly after 8.30pm, when a blue Toyota Prius “deliberately drove” at a police van and stopped in front of it in a restricted area on Constitution Hill.

“As police officers challenged the driver, who was the only occupant in the car, he reached for what we now know to be a 4ft sword, which was in the front passenger footwell,” a spokesperson added.

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

It is understood that no members of the royal family were in Buckingham Palace at the time, with the incident sparking a large evacuation around the palace, St James’s Park and The Mall.

Police officers injured in knifeman arrest outside Buckingham Palace

A witness, Kiana Williamson, said she saw “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,” she added.

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

A 26-year-old man from the Luton area, who has not been named, was taken into custody at central London police station.

He has been arrested on suspicion of grievous bodily harm and assault on police, as well as under the Terrorism Act 2000.

Three unarmed officers, from the local Westminster force, were injured during the struggle to detain the suspect.

Two officers were taken by ambulance to hospital with minor cuts and discharged a short time later, while the third did not require hospital treatment.

Police said the suspect had been arrested on suspicion of GBH and assaulting a police officer (PA)

Commander Dean Haydon, the head of the Met’s counter terrorism command, paid tribute to their “bravery and professionalism”.

“Their vigilance, courage and the swiftness of their response demonstrates how our officers are protecting the public at this time,” he added.

“Officers from the Counter Terrorism Command are now investigating and searches are being carried out in the Luton area today.

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

Commander Haydon said the incident was a “timely reminder” that the national terror threat level remains at severe, meaning further attacks are considered highly likely in the UK.

He added: “The police, together with the security services, are doing everything we can to protect the public and we already have an enhanced policing plan over the bank holiday weekend to keep the public safe.

“We continue to urge the public to be alert but not alarmed and report anything suspicious.”

Sadiq Khan, the Mayor of London, thanked the police officers at the scene for their “heroic and professional” response and ensuring no members of the public were injured.

Belgian police and soldiers at the scene where a man attacked soldiers with a knife in Brussels on 25 August (Reuters)

“It is important we are all alert but not alarmed,” he added.

“Terrorists who seek to harm us and destroy our way of life will never succeed. London stands more united than ever.”

Friday night’s incident came almost exactly an hour after a man attacked three soldiers with a knife in central Brussels in another suspected terror attack.

Belgian troops shot the man, who was also shouting “Allahu Akbar”, and he later died in hospital.

Europe remains on high alert following a string of Isis-related attacks that have killed more than 340 victims in western Europe since 2014.

Four terror attacks have hit the UK so far this year, in Westminster, Manchester, London Bridge and Finsbury Park, which was not Islamist related.

Isis has been intensifying calls for terror attacks on the countries bombing its territories as part of the US-led coalition, issuing detailed advice on carrying out stabbings, vehicle rammings and making explosives.

Some of the deadliest attacks, including those in Paris in November and 2015 and Brussels bombings in March 2016, have been directly orchestrated by Isis, but others have been launched by extremists inspired by the group’s propaganda.

Investigators continue to examine possible links between a cell of terrorists that launched the attacks in Barcelona and Cambrils earlier this month, with an “Isis documents” discovered at their bomb factory in Alcanar.

London Bridge Terror Attack Show all 16 1 /16 London Bridge Terror Attack London Bridge Terror Attack Armed police on Borough High Street as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed Police talk to members of the public outside London Bridge Hospital as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Police Officers outside the Barrowboy and Banker Public House on Borough High Street as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed Police talk to members of the public outside London Bridge Hospital as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed police on Borough High Street as police deal with a 'major incident' at London Bridge PA London Bridge Terror Attack Emergency services near the scene of the incident Screengrab London Bridge Terror Attack People run down Borough High Street as police are dealing with a "major incident" at London Bridge Reuters London Bridge Terror Attack Emergency services arrive at the scene near Borough market at London Bridge Carl Court/Getty Images London Bridge Terror Attack Emergency personnel on London Bridge as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Police sniffer dogs on London Bridge as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack A second helicopter lands on London Bridge as police are responding to three incidents in the capital, amid reports that a vehicle collided with pedestrians on London Bridge, Scotland Yard said. Officers are dealing with reports of stabbings in Borough Market, where armed officers attended and shots were fired. They are also at an incident in the Vauxhall area PA London Bridge Terror Attack Police attend to an incident on London Bridge in London REUTERS London Bridge Terror Attack Police attend to an incident on London Bridge in London, Britain Reuters London Bridge Terror Attack A police officer escorts members of the public to safety at London Bridge Getty Images London Bridge Terror Attack Police attend to an incident on London Bridge in London, Britain Reuters London Bridge Terror Attack Police attend to an incident near London Bridge in London, Britain Reuters

The house, where the volatile explosive TATP was being made alongside a stockpile of gas canisters to be used in vehicle bombs, was accidentally blown up the night before the attacks were launched.

Police said the two rammings that left 15 victims dead were “rudimentary” versions of the horror originally planned by the group led by a Moroccan imam with extremist links.

Isis has been releasing a steady stream of propaganda calling for terror attacks in the West, and is known to be advising followers on how to evade security services in the lead-up to atrocities.

It has not claimed responsibility for the alleged attempt outside Buckingham Palace, but the method of using a vehicle to ram targets before launching an attack with a knife closely matches the group's instructions to extremists.

Officials including security minister Ben Wallace have warned that the threat is increasing as Isis loses territory in Iraq and Syria, with the group turning to attacks as a means of maintaining momentum and publicity.

“I think the threat is still increasing, partly driven by the fact Isis is collapsing in Syria and people are either unable to get out there to fight for Isis and so they look to do something at home, or also because people have come back and tried to inspire people with their stories and tales of the caliphate,” Mr Wallace said last week, echoing concerns raised by analysts across Europe.