Britain's borders are not as secure as they should be and efforts to prevent weapons being smuggled into the country must be stepped up, a major review of counter-terrorism arrangements has warned.
The independent study said there are "real concerns" about how easy it might be for terrorists to bring guns into the UK.
Despite the quality and effectiveness of the work carried out by intelligence agencies and police being among the best in the world, a serious attack is "a matter of not if, but when", according to the report.
Lord Toby Harris of Haringey was asked by Mayor of London Sadiq Khan to carry out an independent review of the city's readiness to deal with a major terrorist incident in the wake of atrocities in Brussels and Paris.
The official threat level for international terrorism in the UK currently stands at severe - meaning an attack is "highly likely".
Around 850 UK extremists have travelled to Syria and Iraq to join Islamic State, with around half estimated to have returned.
Lord Harris's report said a marauding firearms attack - such as the method used in Mumbai in 2008 and Paris last year - is currently considered to be the most significant terrorist threat affecting the UK.
Guns are more difficult to acquire here than elsewhere in the world, but London is not "firearms-free", the review warned.
In July and August, Scotland Yard recorded 202 firearms discharges, compared with 87 in the same months last year.
The review said: "Our borders are not as secure as they should be and much greater efforts should be made to prevent the illegal transportation of weapons and people into the country.
"It would be naive in the extreme to assume that would-be terrorists will not attempt to exploit any such weaknesses."
Much more should be done to strengthen the ability to prevent the importation of firearms, the report said, calling on Mr Khan to seek assurances that the routine screening and searching of cars and freight entering the country is being "significantly enhanced", with an uplift in land-based and sea-based Border Force coverage.
It also said the aerial surveillance capacity that enables the Border Force, National Crime Agency and police to monitor and control the border needs to be enhanced "given that existing capacity is already fully utilised".
Lord Harris made a total of 127 recommendations, including:
:: The Met Police should further explore the use of temporary barriers to protect against a Nice-style attack in London
:: A pilot of new public alert technology to advise Londoners of a major attack, with messages sent directly to mobile devices
:: The installation of CCTV on all Underground and mainline trains
:: Strengthening of security measures on the River Thames
:: A full review of perimeter security at London City Airport
Fifty of the 73 highest risk crowded places across the country are in London, with any attack in the capital likely to have a significant impact on the national economy, according to the report.
It suggested that the potential cost of a Paris-style attack in the capital could top £1 billion.
Elsewhere, the report said the mayor and Scotland Yard should "strongly resist" any attempts by central government to move counter-terrorism functions from the Met to the National Crime Agency.
Lord Harris said: "The quality and effectiveness of the work done by the intelligence services and the counter-terrorist police is amongst the best in the world, and if London were subject to a terrorist attack today, our emergency services response would be substantially faster than five years ago.
"Nevertheless, a serious terrorist attack remains highly possible and we cannot be complacent."