Two foreign women tourists were killed on July 14 and four others were wounded when an attacker stabbed them at the Egyptian Red Sea beach resort of Hurghada, officials and media said.
The governor of Red Sea Province, where Hurghada is located, said two "foreign residents" of the city were killed in the attack, a statement said, without mentioning what country they had come from.
There were conflicting reports about the nationality of the victims.
Egypt's official Al-Ahram newspaper reported on its website that two Ukrainian female tourists died in the stabbing and that four others were injured.
But Ukraine's ambassador to Cairo told Kyiv-based broadcaster Channel 112 that no Ukrainians had been killed.
Major General Muhammad el-Hamzawi, security manager of Red Sea Province, told Reuters that the two victims had been identified as Germans. He said two Czech women were also injured in the attack.
The attacker swam from a nearby public beach to the Zahabia Hotel, where he killed two women and wounded two others before attacking two more people at the adjacent Sunny Days El Palacio resort in Hurghada, security sources said.
The Interior Ministry said in a statement that the attacker was arrested and was being questioned.
"We don't know his motives yet, he could be crazy or disturbed -- it's too early to tell," a senior ministry official said.
In January 2016, three tourists in Hurghada were wounded in a stabbing assault by two assailants with apparent Islamic State group (IS) sympathies.
There was no immediate claim of responsibility for the July 14 stabbing.
Hurghada is one of Egypt's most-popular beach resorts, especially with Ukrainians and European tourists.
Security has been boosted in resorts around the country, as the tourism industry provides Egypt with much-needed revenues.
An IS bombing of a Russian airliner carrying holidaymakers from a south Sinai resort in 2015 killed all 224 people on board and badly affected the country's tourism sector.
Russia suspended all flights to Egypt in response and has yet to resume them.
The July 14 attack came hours after five Egyptian police officers were shot to death in Cairo's twin city of Giza.
In that attack, gunmen riding a motorcycle opened fire on a security vehicle patrolling a Giza village near some of Egypt's oldest pyramids, the Interior Ministry and officials said.
The latest attacks come after 23 Egyptian troops were killed in the Sinai a week ago, in an assault claimed by IS.