Egyptian President Abdel Fattah El Sisi has ruled out the possibility of his nation being drawn into a wider Middle East conflict, amid the Israel-Gaza war.
Egypt shares a border with both Israel and the Gaza Strip.
The Egyptian army, the president said, "with all its capabilities, resources and efficiency has just one objective and that's protecting Egypt and its national security".
Addressing army troops in the city of Suez on the Red Sea, he cautioned them against harbouring "illusions of power".
Mr El Sisi, a former Egyptian army general himself, was reviewing a military parade that included tanks, fighting vehicles, artillery and personnel carriers when he told troops of the army's 4th Armoured Division that the army's capabilities should be used "wisely."
Egypt's biggest security concern at present is what it sees as a plan by Israel and its western allies to force Palestinians to flee the violence in Gaza and find refuge in Egypt's Sinai Peninsula.
Mr El Sisi has repeatedly warned that such a scenario would "liquidate" the Palestinian question and harm Egypt's national security.
Such mass displacement would be a repeat of the fate met by hundreds of thousands of Palestinians who fled or were forced to flee their homes at the time of the creation of Israel in 1948, Egypt has said.
A repeat of that scenario, albeit on a smaller scale, unfolded when Israel captured the West Bank in the 1967 Arab-Israeli war. In both cases, Israel has not allowed Palestinians who left to return to their homes.
Egypt , a close US ally that signed a peace treaty with Israel 44 years ago, has said it is deeply alarmed by the latest outbreak of violence in the Gaza Strip.
The war began when militants from the Palestinian Hamas group rampaged through southern Israel on October 7, killing at least 1,400, including women and children, in the bloodiest day in Israel's history.
Israel has responded with a relentless air campaign against Gaza, killing close to 7,000 people to date, displacing more than a million of the coastal enclave's 2.3 million residents and flattening entire neighbourhoods.
Underlining the danger lurking on Egypt's border with Israel and Gaza, an "accidental" stray shell fired by Israeli troops last weekend hit a border tower on the Egyptian side in the Sinai Peninsula, wounding nine soldiers, two seriously. Israel immediately apologised for the incident.
Since the war began, Israel struck four times the Gaza end of Egypt's Rafah border crossing, rendering it inoperable. Egypt repaired the damage at least twice so that lorries laden with humanitarian aid could drive through and into Gaza, which they did for the first time on Saturday.
Egyptian security forces along the border with Israel and Gaza have been placed on high alert but instructed to exercise maximum restraint.
The air strikes targeting the crossing and the accidental shelling of the border post have fueled anger in the country that's already running high over Israel's devastating pummeling of Gaza and the high civilian death toll it has caused.
Tens of thousands have rallied across Egypt in support of the Palestinians and against Israel over the past two weeks.
Anti-western sentiments have also been running high over what most of Egypt's 105 million people see as the outpouring of unconditional support and sympathy for Israel over the October 7 attacks from the US and many European nations while they refuse to call for an end to the onslaught in Gaza despite thousands of deaths.
"Beware of the illusions of power forcing you to take a step and later saying I never carefully weighed my move," Mr El Sisi told the troops on Wednesday.
Egypt under Mr El Sisi has greatly diversified its arms procurement, purchasing jet-fighters, helicopter gunships, frigates and submarines from manufacturers as far afield as Russia, France, Italy and China.
It has been the recipient of substantial US military aid since it signed the 1979 peace treaty with Israel, Washington's closest Middle East ally. Under the programme, running at $1.3 billion annually at present, Egypt has acquired jet-fighters, tanks, personnel carriers, artillery and naval ships.
In Wednesday's parade, the 4th Armoured Divisions showed off weapons and hardware made in several nations, including the US, Russia, France and Switzerland.