The governor of Red Sea province, where the resort of Hurghada is located, said two "foreign residents" of the city were killed in the attack, a cabinet statement said.
Although the attacker's motives were unclear, the stabbing will come as a blow to Egypt which has been trying to woe back tourists after years of unrest and deadly attacks.
There was confusion about the nationalities of the victims, with Egyptian officials and state media initially saying the two women killed were Ukrainian which Kiev's ambassador to Egypt denied.
An Egyptian health ministry official told AFP "the two foreigners killed earlier are Germans".
But Germany's foreign ministry, which condemned the stabbing as "cowardly" in a statement, said it could not confirm or deny whether its nationals were among the victims.
An Armenian foreign ministry spokesman said two Armenian women had been wounded in the attack, and the Czech foreign ministry tweeted that one of its nationals had been lightly injured.
The interior ministry said in a statement that the attacker, who had swum ashore, was arrested and was being questioned.
"We don't know his motives yet, he could be crazy or perturbed -- it's too early to tell," a senior interior ministry official told AFP.
In January 2016, three tourists in Hurghada were wounded in a stabbing assault by two assailants with apparent Islamic State group (Isis) sympathies.
There was no immediate claim of responsibility for Friday's 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 Isis bombing of a Russian airliner carrying holidaymakers from a south Sinai resort in 2015 killed all 224 people on board and decimated the country's tourism sector.
Russia suspended all flights to Egypt in response and has yet to resume them.
Isis has been waging a deadly insurgency based in the north of the Sinai Peninsula that has killed hundreds of policemen and soldiers.