Two tourists have been killed and four wounded by a man with a knife in the Red Sea resort of Hurghada, according to Egyptian officials.

The Interior Ministry said the assailant was arrested immediately after the stabbings in a hotel on Friday.

Security officials said the two who died were German, not from Ukraine as originally said.

An official said four other foreigners were wounded. They include citizens of Ukraine and the Czech Republic.

In Germany, the foreign ministry said it “cannot rule out” that German citizens were among the victims but it does not yet have that information. The German Embassy in Cairo is in close contact with Egyptian authorities.

The ministry said the initial investigation showed the man got into the hotel by swimming from a nearby beach, then stabbed the tourists in the face, neck and feet. A security official said the assailant, a man in his 20s dressed in jeans and a T-shirt, was intentionally targeting foreigners.

He is said to have shouted: “Stay away, I don’t want Egyptians.”

The assault came hours after a drive-by shooting near some of Egypt’s famed pyramids outside Cairo killed five policemen.