Gunmen on a speeding motorcycle opened fire outside the famed Giza Pyramids on the outskirts of Cairo early Wednesday, killing two police officers in a rare attack near one of the country's top tourist attractions, authorities said.

The attack comes as Egypt tries to rehabilitate its vital tourism industry, which accounted for as much as 20 percent of foreign currency revenues before its 2011 revolt that toppled autocrat Hosni Mubarak and later years of turmoil.

From a high of 14.7 million tourists in 2010, Egypt has had an average of around 9 million a year since, though officials say tourists slowly are coming back. Government officials say the tourism industry saw revenues jump to $4 billion in the first half of this year, compared to $1.9 billion in the same period last year.

The gunmen opened fire on a police vehicle at the back of the Giza Pyramids plateau on a main highway that leads to southern Egypt, wounding the two tourism police officers, a security official said. They died later of their wounds in the hospital, said the official, who spoke on condition of anonymity because he was not authorized to brief journalists.

Egypt's state MENA news agency said the gunmen fled and that an investigation was underway. MENA quoted an antiquities official in the area, Kamal Wahid, as saying the attack was 3 miles away from the main entrances to the pyramids. The location of the attack could not be immediately reached by journalists.

Egypt sees regular attacks on its security forces as it struggles with the low-level Islamist insurgency, mostly in the lawless northern Sinai Peninsula following the 2013 military ouster of elected Islamist President Mohammed Morsi. Typically though, security forces are the targets of the attacks.

But the attacks lately have inched closer to the capital, mostly targeting individual security agents but have also included near-daily small bombings in public areas. One bombing killed a police officer on a bridge in Cairo's upscale island of Zamalek.

An earlier wave of Islamist insurgency peaked in 1997 with a bloody attack against tourists in a temple south of Egypt that left more than 60 tourists killed. So far, however, tourist sites have not been targeted.

The surge in violence in the last two years was accompanied by a crackdown on the 87-year old Muslim Brotherhood, from which Morsi hails, and other Islamists. Militants say the attacks are meant to avenge the crackdown. Sinai-based Ansar Beit al-Maqdis -- which has claimed most of the major attacks in Egypt -- has pledged allegiance to the Islamic State extremist group fighting in Iraq and Syria and has declared itself to be the group's Sinai Province.

The government blames the Brotherhood for the violence, a charge the group has denied. But increasing pressure on the group appears to have caused a schism within, between those who openly call for a direct confrontation and others who call for peaceful means. There also has been a rise in attacks against government institutions, electricity poles and recently the deadly shooting of three judges.

On Wednesday, a soldier was shot dead by a sniper while manning a checkpoint in Sheik Zweid, a town south of provincial capital of northern Sinai, el-Arish, an official said. He also spoke on condition of anonymity because he was not authorized to speak to journalists.

Reflecting an intention to keep up the crackdown, the government proposed Wednesday imposing penalties of no less than a year in prison and a fine for anyone who does not report owning explosives.