Up to 13,500 military personnel will be on duty in London and across the country during the Olympic Games next summer, the government has revealed, including 7,500 to boost the number of security staff inside Olympic venues.

The number is greater than the 9,500 deployed in Afghanistan, although the defence secretary, Phillip Hammond, insisted the large call on the armed forces would not affect operational capabilities elsewhere.

Hammond also revealed that the Royal Navy's largest ship, 22,500-tonne helicopter carrier HMS Ocean, would be based in Greenwich for the duration of the Games, while assault vessel HMS Bulwark would be moored in Weymouth, where the sailing events will take place.

An "appropriate and scaleable" air security plan includes Typhoon aircraft at RAF Northolt, helicopters operating from HMS Ocean and "appropriate" surface to air missile systems.

The police will also deploy up to 12,000 officers on the busiest days of the Games, with the operation being planned on the basis that the terrorist threat level will be set at severe. "This defence contribution is on a similar scale to that deployed at other recent Olympic Games and will contribute to ensuring a safe, secure and enjoyable 2012 Olympics," Hammond said.

"Defence will continue to be able to support current and contingent operations during the Games and my priority will remain the troops we have deployed on operations, including in Afghanistan, before, during and after the Olympics."

The Ministry of Defence confirmed that such were the numbers required that some troops on leave from Afghanistan may have their "holidays interrupted" to serve at the Olympics, though it stressed that they would not lose any days overall.

"Holiday leave will be profiled. This means that some troops who are back within six months of the end of deployment from Afghanistan may be required for the Olympics, though that is not certain at this stage," Hammond told the BBC. "If they are, then they will not lose any holiday. They will still have a full entitlement."

As expected, 7,500 military personnel will be required to help London 2012 organisers inside Olympic venues and training camps, after the number of security staff required soared from an initial estimate of 10,000 to 23,700. Costs have almost doubled from £282m to £553m.

Earlier this year, G4S were contracted on the basis of the initial figure, but the number required rose as a result of a detailed review over the spring and summer. The G4S employees and the military will be augmented by 3,000 or more volunteers and newly trained staff.

Another 5,000 military staff will be deployed to help civil authorities in areas including bomb disposal and search capabilities. They are expected to be kept largely out of sight, as the national Olympic security co-ordinator, Chris Allison, has repeatedly stressed it will be a "blue Games" on the streets.

But the sizable military contingent within the 150-plus Olympic venues and training sites will all be in uniform. Organisers have likened their role to that undertaken annually by the military at Wimbledon.

On top of the 5,000 military personnel to support the police and the 7,500 to contribute to the security effort inside the venues, there will be an additional 1,000 deployed to provide logistical support. The overall figure also does not include those who will be given ceremonial duties.

In a statement, the government said it was "clear that the Games should be a peaceful celebration of sporting achievement and a cultural celebration – not a security event".

Along with transport, security has always been seen as the biggest challenge around the Games facing the government and Olympic organisers.

In addition to the £553m bill for security in venues, there is £600m within the Olympic budget for police provision outside the venues. The government said last year it expected the Metropolitan police to be able to deliver for £475m, but Allison said recently there was no guarantee that would be the case.

"Our relationship with the armed forces has developed over a number of years and we have huge experience in working with them to deliver major events," he said.

"Their support to our operation is built on these tried-and-tested practices. I know that they will also provide excellent support to the event organisers, Locog's [the London Organising Committee of the Olympic and Paralympic Games], own venue security operation."

The National Audit Office last week warned there was a "real risk" that the £9.3bn public sector funding package for the Games would not prove sufficient given the soaring security costs and other potential risks.

Ministers remain confident they will remain within the £9.3bn budget but accept that, according to the most likely risk profile, there is only £36m of headroom on current projections.