Two assailants armed with a gun, a knife and a suicide belt attacked a hotel in the Egyptian Red Sea resort town of Hurghada, wounding two foreign tourists, security sources said.
One of the injured tourists was from Denmark and the other from Germany, the sources said.
They said the attackers had arrived by sea to launch the onslaught on the beach-side Bella Vista Hotel, but that security forces had repelled the assault, killing the attacker wearing the suicide bomb.
However, the Interior Ministry gave a very different account, saying two assailants with knives had wounded two Austrians and a Swede. It said one of the attackers was a student from the Cairo suburb of Giza.
Egypt is fighting a wave of Islamist militancy, which began as attacks on security forces in remote regions of the Sinai, but is increasingly focusing on targets previously considered safe such as the tourist resorts on the Red Sea.
The so-called Islamic State militant group said that an attack on Israeli tourists in Cairo yesterday had been carried out by its fighters, in response to a call by the group's leader, Abu Bakr al-Baghdadi, to target Jews "everywhere".
Security sources said those tourists were Israeli Arabs. None were hurt and Egyptian authorities said the attack was aimed at security forces.
On 31 October, a Russian passenger plane crashed in the Sinai, killing all 224 people on board, most of them tourists returning home from the Red Sea resort of Sharm al-Sheikh.
Cairo said it has found no evidence of terrorism in the crash, but Russia and Western governments have said the airliner was probably brought down by a bomb, and IS said it had smuggled explosives on board.
Tourism is critical to the Egyptian economy as a source of hard currency, but has been ravaged by years of political turmoil since the revolution that ousted veteran president Hosni Mubarak in 2011.