Three army officers and a soldier were killed on Wednesday during an army operation against militants in the Western Desert's Bahariya Oasis, the military said.
The attack took place as troops were carrying out a raid against terrorists in the region after air forces conducted reconnaissance in the area, the army said in a statement on Wednesday.
The military personnel were killed after "an explosives belt belonging to terrorists blew up while land troops were combing the area," the army statement said.
During the operation, army forces destroyed two 4x4 vehicles carrying terrorists.
The Egyptian army has been conducting operations in the Western Desert to stop the infiltration of militants or the smuggling of weapons through the Egyptian-Libyan border.
Hundreds of Egyptian security personnel have been killed in attacks by Islamist militants on army and police forces – mostly in northern Sinai – in the last four years.
Last week, President Abdel-Fattah El-Sisi said that Egypt had destroyed 300 vehicles trying to cross the border from Libya to carry out hostile operations against the country over the past two months.