Egypt's president said Wednesday that Iran must stop "meddling" in the Middle East and the security of Arab Gulf countries must not be threatened, but he underscored that he does not want war and believes dialogue can resolve the region's crises.

With his comments, President Abdel-Fattah el-Sissi threw his support behind Egypt's Gulf ally Saudi Arabia amid the kingdom's mounting tensions with Iran. But he avoided the increasingly aggressive rhetoric that has come from Riyadh in recent days.

Over the weekend, Saudi Arabia blamed Iran for a missile fired toward its capital by rebels in Yemen and warned that could be considered an act of war. At the same time, Saudi officials accused Iran's Lebanese ally Hezbollah of "declaring war." The kingdom appears to have orchestrated the collapse of Lebanon's government, which included Hezbollah, by pushing its prime minister to resign.

The Egyptian leader told reporters that he did not want more tensions in the region, but that doesn't mean threats to Arab countries can be tolerated.

"The region has enough instability and challenges as it is. We don't need any new complications involving Iran or Hezbollah so we don't add new challenges to the region," el-Sissi said at a news conference in the Red Sea resort of Sharm el-Sheikh.

"I am against war, we can resolve crises with dialogue," el-Sissi said when asked about the possibility of war with Iran or Hezbollah.

But, he added, "Gulf security is a red line and others must stop meddling in our affairs and not work to escalate tensions. We in Egypt believe that Arab and Gulf security and any threat to Gulf (Arab) nations is a threat to our own national security."

He also said Saudi Arabia remained stable in the wake of the surprise arrest over the weekend of dozens of ministers, members of the royal family, businessmen and senior army officers.

"Conditions in Saudi Arabia are totally stable and I have confidence in the government's handling of the situation," el-Sissi said during the two-hour news conference held on the sidelines of an international gathering of youths convened under the Egyptian leader's patronage.

His comments reflected the recent hardening of Egypt's public rhetoric on Shiite and non-Arab Iran, a shift that matches Cairo's close ties with Saudi Arabia, the United Arab Emirates and Bahrain -- Sunni-led countries that see Iran as an existential threat. However, el-Sissi would not say whether Iran has become an outright enemy of his country.

He said arms purchases worth billions of dollars concluded by Egypt since he took office in 2014 were needed in response to what he called a "strategic imbalance" in the region since the area was jolted by Arab Spring revolts that have since 2010 engulfed Tunisia, Egypt, Yemen and Syria.

"We had to have the hardware to redress the balance and fight terrorism ... we need to be able to deal with any threat when it directly confronts us," he said.

Egypt has since 2014 purchased Rafale fighter jets and helicopter carriers from France, MiG-29 fighter jets and assault helicopters from Russia and submarines from Germany. Moreover, Egypt receives $1.3 billion in annual U.S. aid.