Image copyright Getty Images

Britain is upgrading its armed police response to terror attacks, with £114m to fund an extra 1,000 armed police over five years. What capability does this buy, and how prepared is the UK for what is known as a marauding terrorist firearms attack?

Wind the clock back to November 2008 and the answer was - almost totally unprepared.

Over a near two-day period, a 10-man cell of heavily-armed jihadists from Pakistan carried out a prolonged massacre in the heart of India's commercial capital, Mumbai, killing 164 people.

All over the world, police and counter-terrorism officials asked themselves the uncomfortable question: How would we cope if it happened here in our cities?

In Britain there was a realisation that the police would probably be so outgunned that they would likely have to call in military assistance.

Terrorism 'most immediate threat to UK'

Threat 'at highest since 1970s IRA plots'

Major counter-terrorism exercise in London

At the very least, there would be an unacceptably long time gap between the first shots being fired by terrorists and the threat from them being eliminated, during which time large numbers of hostages could quite possibly have been killed.

The national security response was to massively "up-gun" the police response.

New, mobile armouries were introduced with modern high-powered weapons in the back, capable of bringing concentrated firepower onto a terrorist target.

A series of realistic exercises were staged across the country, codenamed "Wooden Pride", involving police firearms officers, snipers, SAS operatives and even lawyers.

Participants were made to take part in mock law courts where they had to explain to a sceptical "judge" exactly why they had pulled the trigger at certain points during the exercise.

Image caption Police have been carrying out exercises to anticipate a wide variety of terror threats

Today, while patently nowhere is entirely safe from terrorist attack, the precautions put in place have dramatically changed the security environment in London and other cities.

Anyone watching the horrific events in Westminster on 22 March could not fail to notice the speed of the armed police response.

Within minutes of a car being deliberately driven into pedestrians on Westminster Bridge, and the assailant then running into the Palace of Westminster, the whole area was sealed off by heavily armed specialist firearms officers (SFOs) from the Metropolitan Police's Specialist Firearms Command.

They were carrying a mixture of powerful, recently-acquired weapons comprising the Swiss-made Sig Sauer SG516 5.56mm Automatic Rifle, the MCX Carbine variant with its telescopic stock and red dot sight, and the Austrian-made Glock 17 Pistol, a lightweight 9mm 17-round handgun often seen strapped to the right-hand leg.

Another weapon in the SFO's armoury is the German-made Heckler & Koch G36 Carbine.

All of these weapons have been steadily replacing the older Heckler & Koch MP5 Carbines, a familiar sight at Heathrow Airport and often mistakenly called submachine guns, (they are configured to fire single shots, not bursts of automatic fire).

Image copyright PA Image caption Police reacted within minutes to the Westminster terror attack

The rapid response on 22 March was hardly surprising given that this attack took place in the heart of Whitehall.

But throughout central London police Armed Response Vehicles (ARVs) are constantly patrolling, using BMW X5s with secured armouries in the back.

In theory, these ARVs should never be more than eight minutes away from the scene of an incident.

Similar arrangements exist in other major cities and regions across the country, such as the West Midlands.

An even more specialised armed police unit involves Counter Terrorism Specialist Firearms Officers (CTSFOs), who reportedly arrived on the scene of the 22 March Westminster attack within six minutes.

Originally formed for the London 2012 Olympics, they are recognisable by their grey uniforms, black Kevlar body armour, ballistic helmets, facemasks. goggles and Velcro patches bearing the CTSFO logo.

They are trained to tackle a wide spectrum of terrorist and hostage situations, including fast-roping down from Eurocopter EC-145 helicopters, and are equipped with a range of specialist equipment.

This includes pump-action shotguns, polycarbonate body shields, chainsaws, crowbars and motorbikes capable of speeds up to 140mph.

Image copyright AFP Image caption The "physical" response is only part of the picture in UK counter-terrorism activities

But all of this "physical" response is, of course, only part of the picture in counter-terrorism.

A major component of stopping attacks takes place out of public sight, much of it in cyberspace, a war waged daily by analysts and codebreakers at GCHQ and MI5.

Tip-offs by the public have also been crucial.

This week the National Police Chiefs Council revealed that in the last two months the police had received more than 3,000 tip-offs by the public about possible terrorist attacks.

Forging that link between the police and communities has taken years of painstaking work in this country, with frequent setbacks, but in several other European countries it is almost non-existent.

So without timely and accurate intelligence no amount of state-of-the-art hardware will prevent the next attack.