Updated

Islamic militants unleashed a suicide car bomb and heavy gunfire on an Egyptian military checkpoint in northeastern Sinai Peninsula on Friday, killing 23 troops and wounding 33, officials said.

Among those killed in the attack — the deadliest on the country's military this year — were five officers, including a high-ranking special forces colonel, Ahmed el-Mansi, according to security officials.

The assault started when a suicide car bomber rammed his vehicle into a checkpoint at a military compound in the village of el-Barth, southwest of the border town of Rafah, followed by heavy gunfire from dozens of masked militants on foot, said the officials, who spoke on condition of anonymity because they were not authorized to speak to the media.

As the attack unfolded, ambulance sirens were heard from a distance rushing to the site. The officials initially put the death toll at 10 but later said that more bodies were pulled from under the rubble of a nearby building, used as a rest house for troops, that was destroyed in the attack.

The militants arrived at the site of the checkpoint — located in a remote, desert area — in some 24 Land Cruiser SUVs, and opened fire on the soldiers with machine guns for nearly half an hour, the officials said. The troop presence at the compound is estimated to have numbered about 60 soldiers.

After the attack, the militants looted the checkpoint, taking away weapons and ammunition before fleeing the scene, the officials added. It was unclear if they also took armored vehicles as well.

The next army compound is located an hour's drive away, leaving the targeted site with no support except for local, armed tribesmen from the Tarabeen, who have their own small checkpoints nearby.

The wider area of the attack is considered to be an IS stronghold and was the site of fierce battles in the spring between the tribesmen and militants. The officials told The Associated Press that some senior officers have voiced opposition to the location of the checkpoint, arguing that it provided no real cover.

Earlier, Egyptian army spokesman Tamer el-Rifai confirmed the attack on his official Facebook page, saying that 26 army personnel were killed or wounded in Friday's attack. He didn't prove a breakdown.

He said the army foiled attacks targeting a number of other checkpoints in the Rafah area and that 40 militants were killed. Witnesses said that they saw Apache helicopters carrying out airstrikes across Rafah after the attack. On his page, al-Rifai posted photographs of allegedly slain militants dressed in military uniforms.

No group immediately claimed responsibility for the attack. However, Egypt has been battling a stepped-up insurgency in northern Sinai in recent years, mainly by militants from an Islamic State affiliate.

Though the IS affiliate has not managed to seize territory in Sinai it has a strong presence in the western and southern area of Rafah in the peninsula, on the outskirts of the town of Sheikh Zuweid, and inside the residential area of Sinai's largest city, el-Arish.

Over the past months, IS has focused its attacks on Egypt's Christian minority and carried out at least four deadly attacks that killed dozens, prompting army chief-turned-President Abdel-Fattah el-Sissi to declare a state of emergency in the country. However, the restive northern Sinai has been under a state of emergency since October, 2014 after Islamic militants killed more than 30 soldiers in a single attack.

In January, eight policemen were killed in the city of el-Arish in a car bomb explosion.

The Sinai branch of the Islamic State group appears to be the most resilient outside Syria and Iraq, where the so-called caliphate is now witnessing its demise. The group's offshoot in Libya has been uprooted in months-long battles in the central city of Sirte while its branch in Yemen has failed to seize territories or compete with its al-Qaida rivals.