LONDON (CNN) --
She said it had only become clear on Wednesday that the contractor G4S was not able to provide all the security staff it had promised to the organizers of the London Olympic Games.
But, May told the House of Commons, "there is no question of Olympic security being compromised."
The government's decision to bring in additional troops, on top of the 13,500 already agreed, was the appropriate response to the shortfall in G4S staff, she said.
"Contingency planning has always been central to our security work," May said.
The deployment means that 17,000 troops will be on duty in the United Kingdom during the Games, compared with the 9,500 currently in Afghanistan.
G4S had been expected to recruit a staff of more than 10,000 as part of a total security force of 23,700 for the Olympic and Paralympic Games. It will still provide several thousand personnel.
Britain is on a heightened state of alert ahead of the Games, which open on 27 July.
Grilled by opposition politicians as she gave an emergency statement to the House of Commons, May rejected suggestions that the government had either not been on top of planning for the event or had been misled by G4S about its preparations.
"This is not a lax approach to security, it is about the government ensuring we have the right approach to security," May said.
Her opposition counterpart, Labour's Yvette Cooper, said it looked like "another Home Office shambles."
May said it was the organizing committee's responsibility to ensure that G4S honored its contract and to enforce any penalties written into the contract, and that the British public would not pick up the bill for the security firm's failings.
A Home Office statement released late Wednesday said: "The government are committing £553 million for venue security and we remain confident that we will deliver within budget."
A G4S spokesman said in a statement that the contractor is "committed to ensuring that London 2012 is safe and secure" and that it understands the government's decision to bring in extra troops.
G4S already has about 4,000 people at work across 100 venues and has more than 9,000 people going through the required vetting, training and accreditation process, the statement said.
"This is an unprecedented and very complex security recruitment and deployment exercise which is being carried out to a very tight schedule," it said.
"We have encountered some delays in progressing applicants through the final stages but we are working extremely hard to process these as swiftly as possible."
The military personnel on duty will include reservists, the Ministry of Defence said, and the Olympic organizers have agreed to give 10,000 tickets to the armed forces to compensate for the short-notice deployment.
"I can confirm that there remains no specific threat to the Games. Nor is there an increased threat to the Games," said Defence Secretary Philip Hammond. We are confident that the UK is ready and able to provide a safe and secure Olympic Games for the whole world to enjoy."
May also faced repeated questions from lawmakers over border control at Heathrow Airport, amid concerns over staffing levels -- as some visitors wait more than two hours to enter the country -- and the stringency of security checks.
Staffing is being stepped up for the Olympics, with additional personnel being brought in to ensure all desk are manned, May said.
The United Kingdom's independent chief inspector of borders, John Vine, said Wednesday there had been some progress since a critical report in February, but the extra staff drafted in to ease congestion "often processed passengers less quickly and asked fewer questions."
He also cited concerns over efforts to detect forged documents in some of the airport's terminals.
Meanwhile, work to repair the main route from Heathrow Airport into London continues, following the discovery of significant cracks in a viaduct.
A section of the M4 motorway has been closed in both directions since the end of last week, resulting in broad delays for drivers forced to take alternative routes into the capital.
The Highways Agency, which is in charge of the UK road network, said Wednesday that the road would remain closed because the complex repair work had reached a critical stage.
"The Highways Agency and its contractors are working around the clock and will reopen the motorway as soon as it is safe to do so," it said. "Conditional on the repair work being successful, it is still expected that the work will be completed and the road reopened within the next few days."