Update 10:03pm: Two German female tourists have been stabbed to death while four other foreigners were wounded in an attack at a hotel in an Egypt resort.
The assault in the Red Sea resort of Hurghada came hours after a shooting near famous pyramids outside Cairo killed five policemen.
The motive behind the stabbing was unclear and the Interior Ministry said the attacker was arrested immediately.
A security official said the attacker, a man in his 20s dressed in a black T-shirt and jeans, wielded a knife and targeted foreigners.
"Stay away, I don't want Egyptians," the assailant said in Arabic, according to the official.
Without taking any blame for what appears to be a major security breach, the Interior Ministry said the attacker had got into the hotel by swimming from a nearby beach.
No group claimed responsibility for killing the five police officers but it bore the hallmarks of a smaller Islamic militant group known as Hasm that has been behind similar shootings.
The attacker in Hurghada stabbed the tourists in the face, neck and feet, according to the security official.
Two German tourists died of their wounds while four others were hurt, including citizens of Ukraine and the Czech Republic, the official said.
In Germany, the foreign ministry said it "cannot rule out" that German citizens were among the victims but stressed that it does not have that information.
Man arrested after six tourists injured in stabbing at hotel in Red Sea resort of Hurghada, Egyptian officials say https://t.co/pOtP7CnWvB— BBC Breaking News (@BBCBreaking) July 14, 2017
An emergency doctor at the al-Salam hospital confirmed the wounded tourists were taken there.
Gunmen riding on a motorcycle opened fire on a security vehicle patrolling a Giza village, killing the five policemen, the Interior Ministry and officials said.
The deadly shooting - on the Muslim weekend when traffic is slower - heightened fears of what has become near-weekly attacks by suspected Islamic militants after a blitz attack left 23 troops dead in northern Sinai a week ago.
Egypt has been under a state of emergency for months following a series of church bombings in the spring that killed scores of Christians.
The village of Abusir in Badrashin, where the policemen were killed, is part of Greater Cairo.
The policemen were part of the force tasked to guard the district of Saqqara, one of Egypt's most popular tourist sites.
According to the ministry, the militants sprayed the police vehicle with machine-gun fire and fled the scene after one returned gunfire.
However, a video circulated on social media appears to show the attackers faced no resistance.
It shows them seizing police weapons and radios and setting fire to the bodies after the shooting.
Authorities cordoned off the area and ambulances rushed to the site.
Hasm, or "decisiveness", is a militant group that authorities have linked to the now-outlawed Muslim Brotherhood.
It has claimed responsibility for drive-by shootings and attacks that targeted police, military, judges and pro-government figures in the past.
Earlier: The Associated Press are reporting that the two tourists killed by a knife attacker at an Egyptian holiday resort are not Ukrainian, as originally reported, but German.
Update: Two Ukrainian tourists were killed and four other tourists have been wounded by a knife attacker at an Egyptian holiday resort, Egypt’s Interior Ministry have confirmed.
It is understood that the attacker had swum from a nearby public beach to access the holiday resort in Hurghada, some 400 km (250 miles) south of Cairo. He has been arrested.
Egypt’s security forces are fighting an Islamist insurgency in the Sinai Peninsula and militants have carried out attacks in the past on the tourism industry.
Earlier: Six tourists have been wounded by a man with a knife in the Red Sea resort of Hurghada, according to Egypt’s Interior Ministry.
The ministry said the assailant was arrested immediately after the stabbings on Friday.
It said the initial investigation showed the man got into a hotel by swimming from a nearby beach and attacked the tourists, of various nationalities.
The motive for the attack is not known.
The ministry said the tourists were rushed to a local hospital. It gave no further details and did not provide the nationalities of the victims.
The incident comes after masked gunmen on a motorcycle have opened fire on a security checkpoint in Egypt, killing five policemen near some of the country’s oldest pyramids in Giza, officials said.
The drive-by shooting in the early hours of the morning took place in the village of Abusir in Badrashin, part of Greater Cairo.
The officers were part of the force guarding Saqqara, one of Egypt’s most popular tourist sites and host to a collection of temples, tombs and funerary complexes.
The attack took place near the famous Step Pyramid of King Djoser - the oldest of Egypt’s more than 90 pyramids and the forerunner of the more familiar straight-sided versions in Giza, on the outskirts of Cairo.
Attackers stole the weapons and radios of the victims and tried to set fire to the bodies but fled after seeing people gathering nearby, witnesses said.
Insurgents have carried out a number of attacks in Egypt since the 2013 military removal of elected Islamist president Mohamed Morsi.
The violence has been concentrated in the northern Sinai peninsula, but attacks have spread in the mainland, including in the capital where suicide bombers have struck churches and security headquarters.
While an Islamic State group affiliate has claimed major attacks, a shadowy group called Hasm, or "Decisiveness" - which the government suspects is linked to the now-banned Muslim Brotherhood - has claimed similar drive-by shootings and attacks targeting police, military, judges and pro-government figures.
The Brotherhood won a series of elections in Egypt following the 2011 uprising that toppled long-time autocrat Hosni Mubarak, and Mr Morsi, a senior Brotherhood leader, became Egypt’s first freely elected president the following year.
His brief rule proved divisive, and the military overthrew him in 2013. Authorities outlawed the Brotherhood a few months later, declaring it a terrorist group.
Last Friday, IS claimed a stunning attack on a remote Egyptian army outpost in the Sinai peninsula with a suicide car bomb and heavy machine gun fire, killing at least 23 soldiers.
It was the deadliest attack in the region in two years. On the same day, Hasm claimed the fatal shooting of a policeman as he was heading for Friday prayers.
Over the past few days, the government announced killings of members of Hasm in alleged shootouts with security forces.
In previous incidents, families of the suspects challenged authorities’ accounts and accused them of illegal detentions, torture and executions.