Armed troops will be deployed to guard "key locations" such as Buckingham Palace, Downing Street, the Palace of Westminster and embassies, Scotland Yard has said.

Soldiers will replace armed police at many sites under Operation Temperer, which is being enacted after security experts warned the Government that another terrorist attack could be imminent.

The threat level has been raised to critical.

The decision taken at a meeting of the Government's emergency Cobra committee will mean soldiers will play a key role in protecting civilians and free up armed police officers to help fight the terror threat.

Scotland Yard said the military will be working under Scotland Yard's command structure to provide "static armed guarding at key locations" which "will include Buckingham Palace, Downing Street, embassies and the Palace of Westminster. This will free up armed officers to carry out patrols".

Commander Jane Connors, leading the London policing operation, said: "We will do all we can to protect the capital that we serve at this unsettling time. All our work is designed to make our city as hostile an environment as possible for terrorists to plan and operate."

Scotland Yard said there would be a surge in police numbers and operations with immediate effect.

Extra armed officers will provide support for an operation called Project Servator which sees uniformed and undercover officers trying to spot people carrying out "hostile reconnaissance" and other criminal activity on the capital's streets.

The tactic "is based on extensive research into the psychology of criminals and what undermines their activities", the force said.

There will also be an increase in the use of stop and search, vehicle check points and number plate recognition technology.

Ms Connors added: "The reality is that we must be prepared to be able to respond to and deal with armed and deadly attackers, so we must be in a position to respond with firearms officers who will use force to stop those attackers in their aim.

"That is why is we have increased the number of firearms who are on duty, both out walking and in roaming patrols, at fixed points and carrying out a range of operations."

The use of the military is part of Operation Temperer which is believed to allow up to 5,000 troops to be deployed in support of the police.

The country's senior counter-terrorism officer on Tuesday acknowledged the use of troops was "unusual" but it would allow police to "stretch our armed capability".

Met Police Assistant Commissioner Mark Rowley said the first phase would allow soldiers to replace police officers at fixed locations but after that they could "augment our patrols" at sites such as transport hubs and major events.

"There are many big events across the country over the next couple of weeks, we are going to be working really closely with the organisers to review the security, review their stewarding arrangements, review our policing arrangements and make sure that decisions are taken that events only go ahead when it's sensible and safe to do so," he said.

The plan means soldiers could be deployed to support police at major events such as the FA Cup final at Wembley on Saturday or the Champions League final in Cardiff on June 3.

Prime Minister Theresa May said the operation had been authorised by Defence Secretary Sir Michael Fallon at the request of the police after experts at the Joint Terrorism Analysis Centre (JTAC) raised the threat level from "severe" to the highest "critical" setting.

The West Midlands and West Yorkshire forces both said they had no immediate plans to make use of the military support.

Greater Manchester has yet to decide.