Islamic State's Egyptian branch has claimed responsibility for a bombing that killed at least seven people in a hotel in North Sinai 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.
A suicide bomber then broke into the hotel restaurant and blew himself up and a gunman entered the guest rooms area and killed a judge.
Egypt's Health Ministry said 17 people were wounded.
The Sinai Province group 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,"
The group has carried out similar attacks as part of a violent and long-running insurgency 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.
Two judges, four policemen and a civilian were killed, the Interior Ministry said.
The attack 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 overseeing the counting ballots to ensure the process is fair.
"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 said.
"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 Mr Mahana. The restaurant was empty at the time.
The hotel manager added: "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."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here