Seven people -- including judicial officials and security personnel -- were killed on Tuesday and eight were injured in North Sinai's restive city of Al-Arish in attacks on a hotel where judges supervising parliamentary polls were residing.
The ISIS-affiliated militant group in North Sinai, Ansar Beit Al-Maqdis, claimed responsibility for the attacks. The same group said weeks earlier it had brought down the Russian airliner that crashed over Sinai last month, killing all 224 on board.
A suicide bomber was driving a car bomb into the Swiss Inn hotel when security forces opened fire on him, causing the car to explode away from the hotel and the bomber to die, the Egyptian military said in a statement.
Another attacker wearing an explosive belt later snuck into the hotel's kitchen and blew himself up, while a gunman went up to one of the rooms and opened fire, killing a judge.
"One judge, Amr Hammad, was among those killed and two civilians are among the injured. They were treated in Al-Arish public hospital," said Khaled Megahed, the health ministry spokesperson.
Speaking to ONtv later in the day, Megahed confirmed that the death toll has risen to seven, including three police soldiers, one police conscript and an electrician.
The Egyptian justice ministry announced prosecutor Amr Mostafa was among those who were killed.
Two of the eight who were injured are in a critical condition, Megahed added, including a judge who underwent surgery. The army statement said the attacks also left security personnel injured.
"This brutal incident is a failed, desperate attempt to hinder the state," said army spokesman Mohamed Samir in the statement. "We emphasise that [this incident] will strengthen the persistence and determination of police and the armed forces to root out terrorism in North Sinai."
Ambulances rushed to the scene as gunshots were heard following the explosion. A main coastal highway in the city was shut down following the attack.
In a statement circulated on Twitter, Ansar Beit Al-Maqdis said the attack took place to avenge the imprisonment of female Muslims by the "apostate" Egyptian army.
"A brother... hit with his car bomb a security force guarding the Swiss [Inn] hotel where 50 judges were staying only to be followed by a lion who broke into the judges' headquarters with his automatic weapon... then blew up his explosive belt among them," read the statement.
For years, Egypt has been fighting in North Sinai an Islamist militant insurgency, which spiked in 2013 following Islamist president Mohamed Morsi's ouster.
Over the past two years, Ansar Beit Al-Maqdis claimed responsibility for a number of attacks, some of which targeted judges in Al-Arish.
Islamist militants, who have primarily targeted security forces since the removal of Morsi, have in recent months targeted several judges amid the conviction of many Morsi supporters in terror-related cases.
"The judges pledge to God and country to continue giving [to the people], and continue their efforts… [to uphold justice]," read a statement released by the justice ministry after Tuesday's attacks. "They will not rest until... the criminal terrorists get just retribution."
Ahead of the ongoing parliamentary polls, the State Litigation Authority enacted an insurance policy with the Misr Insurance Company for members of the legislative body overlooking the electoral process. The policy stipulates that LE1 million (about $127,000) is to be paid out in cases of death and LE750,000 (about $94,500) in cases of disability.
Justice Minister Ahmed El-Zend confirmed that a compensation of LE1 million would be paid to each of the families of the slain judge and prosecutor, the last two victims of militancy from the judiciary.
Egypt's top prosecutor Hisham Barakat died from injuries sustained in a Cairo bomb attack last June. In May, three judges and their driver were killed when gunmen opened fire on their vehicle in Al-Arish.
In March, a small bomb was left in front of the house of judge Fathi Bayoumi, who investigated the corruption charges against Mubarak-era interior minister Habib El-Adly. The words "a gift for El-Adly's acquittal" were scribbled on a wall near the attack.
Two months earlier, a bomb attack targeting judge Khaled Mahgoub, who is representing the general prosecution in Morsi's jailbreak trial, caused damage to the windows and walls of his house.
The parliamentary elections, the second stage of which took place Sunday and Monday, did not witness violence the past weeks neither during campaigning nor polling.
Judges are currently supervising the counting of the votes. Run-offs of the second stage are due on December 1 and 2.