Islamic State's Egyptian branch claimed responsibility for a bombing that killed at least seven people in a hotel in North Sinai on Tuesday where judges overseeing a parliamentary election were staying.
A militant tried to drive a car bomb into the hotel in the provincial capital al-Arish before security forces opened fire, causing the car to explode, the military and a witness said.
A suicide bomber broke into the hotel restaurant and blew himself up and a gunman entered the guest rooms area and killed a judge, they said. Seventeen people were wounded, the Health Ministry said.
"A brother … seeking martyrdom hit with his car bomb the security force protecting the Swiss (Inn) hotel where 50 judges were staying, only to be followed by a lion … who broke into the judges' base with his automatic weapon … then blew up his explosive belt among them," Sinai Province said in a statement circulated by its followers on Twitter.
The group has carried out similar attacks in the region as part of its bid to topple the Cairo government.
It said two of its members carried out the attack. The Interior Ministry said there were two attackers but the military and a witness said there were three militants. It was not immediately possible to clarify the contradiction.
Two judges, four policemen and a civilian were killed, the Interior Ministry said. The military said the three militants were killed.
The blasts followed Monday's second round of voting in Egypt's parliamentary election.
Egyptian elections are monitored by the judiciary with judges running polling stations, observing the voting and counting ballots.
"This brutal incident is a failed attempt to hinder the state from building its institution but we assure all that it will increase the drive and insistence of the armed forces and the Interior Ministry to weed out the roots of terrorism in North Sinai," a military statement read.
The attack happened early in the morning and started with the car bomb, Swiss Inn manager Mohamed Mahana told Reuters.
"The security forces shot the suicide bomber and his car and his tyres blew up but he kept driving until he got to the hotel entrance then the explosion happened. It was huge."
A second suicide bomber came in through the beach and into the hotel restaurant, breaking its window, before blowing himself up, said Mahana. The restaurant was empty.
"A third attacker sneaked into the hotel through the side where the guest rooms are and shot passers by, killing one judge, before a security official shot him."