In a Saturday statement, the Interior Ministry, which oversees the police, said 10 of the militants were killed when the security forces stormed their hideout in el-Arish, a coastal city in the turbulent north of Sinai, epicenter of a long-running insurgency by Islamists.
Another 14 were killed in the Cairo suburb of October 6 and 16 more in a housing project on a highway heading west from Cairo. The statement said the militants were preparing for attacks on government and tourism facilities, army and police personnel, as well as Christian churches.
The ministry also released a series of images purportedly depicting some of the militants killed in the raids, with assault rifles seen next to their bloodied bodies.
The statement did not say when the raids took place, suggesting that the timing of its release was designed at least in part to show that security forces were scoring successes against militants across the country and staunch potential criticism of their perceived failure to protect tourists.
The area where the attack took place — Marioutiyah, near the famed Giza Pyramids — has seen a series of attacks over the past two years, mostly targeting the police. It is also widely suspected of being home to jihadist cells loyal to the Muslim Brotherhood, an Islamist group removed from power by the military in 2013 after its divisive rule lasted one year.
Friday night's attack took place as Egypt's vital tourism industry was showing encouraging signs of recovery after years in the doldrums because of the political turmoil and violence that followed a 2011 uprising that toppled an autocratic president. The revival of the labor-intensive sector has been warmly welcomed in a country whose economy is struggling to find its footing, with a series of ambitious reforms unleashing wave after wave of steep price rises.
The attack is also likely to prompt authorities to further tighten security around tourists and the facilities they frequent — hotels, museums, antiquity sites and bazaars — during the busy holiday season.
Security measures already cause long delays at the country's airports and antiquity sites. Tourist buses routinely get a police escort and Egyptians are generally subjected to even more stringent security checks at tourist facilities.
There will likely be stepped up security measures for churches and associated facilities ahead of the New Year's Eve celebrations and next month's Christmas of the Coptic Orthodox Church, the dominant denomination among Egypt's estimated 10 million Christians.
Egypt has battled Islamic militants for years in the Sinai Peninsula in an insurgency that has occasionally spilled over to the mainland, striking minority Christians or tourists. However, Friday's attack was the first to target foreign tourists in almost two years.
Over the past two years, militant attacks against Christians in Egypt — usually targeting churches or buses carrying pilgrims to remote desert monasteries — have killed over a hundred people, prompting authorities to introduce metal detectors and body searches outside churches.
In some churches, guards demand to see proof that visitors are Christians, often in the form of the cross tattooed on the right wrist that many Egyptian Christians get in their infancy.
Friday's blast wounded 11 other Vietnamese tourists as well as the Egyptian driver of the bus, which was carrying a total of 15 Vietnamese tourists, according to Vietnam's Ministry of Foreign Affairs. It said that 10 were seriously injured.
Vietnamese Ambassador to Egypt Tran Thanh Cong visited the scene of the attack and Al Haram Hospital, where the victims were being treated, the ministry said.