Egyptian President Abdel Fattah el-Sissi says an attack that killed 22 border guards will "not go unanswered."
The Egyptian military border guards were killed on the frontier with Libya on July 19.
Sissi said on July 20 that "terrorism will be uprooted from every part of Egypt." He also declared three days of mourning for the border guards.
Security officials said the assailants were smugglers.
But an army spokesman said on his Facebook page that "terrorists" -- the term authorities use to describe Islamist militants -- were behind the attack.
He said a weapons storage facility was blown up by a rocket-propelled grenade in an exchange of fire, killing the soldiers and wounding four others.
The attack took place on July 19 in Wadi al-Gadid governorate, which borders both Sudan and Libya.
Two smugglers were killed in clashes with the guards, security officials said.
Egyptian President Abdel Fattah al-Sisi has repeatedly expressed concerns about militants who have capitalized on the chaos in Libya and set up operations along the border.
Based on reporting by AP and Reuters