CAIRO (Reuters) - When Saudi Arabia’s Mohammed bin Salman chose Egypt for his first official trip abroad since becoming crown prince, Cairo draped its streets with banners declaring the two countries to be “the beating heart” of the Middle East.

FILE PHOTO: Saudi Crown Prince Mohammad Bin Salman (R) listens to Egyptian President Abdel Fattah al-Sisi (C) during investment projects in the Suez Canal at the city of Ismailia, Egypt, March 5, 2018, in this handout picture courtesy of the Egyptian Presidency. The Egyptian Presidency/Handout

The prince paid tribute to Cairo’s importance, saying “when Egypt rises, so can the whole region”.

“I prayed to God that Egypt would not collapse,” he told editors in Cairo, referring to the upheaval which followed Egypt’s 2011 popular uprising. “What I saw today confirmed to me that God answered my prayer.”

But the remarks by the powerful Saudi heir this month also showed how Egypt, once the leader of the Arab world, has yet to reclaim its position while power and influence shift east to wealthy and assertive Gulf oil exporters.

Gulf Arab states such as Saudi Arabia and the United Arab Emirates are increasingly engaged in foreign forays, deploying money and arms to intervene in regional conflicts and to shore up struggling allies such as Egypt’s President Abdel Fattah al-Sisi, whose forces are fighting an Islamic State insurgency in the Sinai peninsula.

After stagnating in the last years of former president Hosni Mubarak, Egypt saw its regional standing erode further after Mubarak’s 2011 overthrow and the political turbulence, economic crisis and Islamist attacks which followed.

Supporters of Sisi, who seeks re-election this month, say the former general could bring security and revive Egypt’s pivotal role in mediating Middle East peace talks.

Diplomats say, however, that as long as Egypt faces internal security problems and the region is volatile, Cairo will focus on issues close to home such as militants in Gaza and Libya, and an Ethiopian dam that threatens its water supply. Thorny topics such as Palestinian-Israeli peace will take a back seat.

“In certain periods of time there is no question that we determined war and peace in the Middle East,” said diplomat Nabil Fahmy, who was a young official when Egypt became the first Arab state to make peace with Israel in 1978.

Egypt’s upheaval has meant that recent years have been challenging for Cairo’s diplomacy, said Fahmy, was foreign minister for a year after Sisi took power in 2013 and also served as Egypt’s ambassador to Washington under Mubarak.

“When you have ... been through a process of transition ... people look at you and say ‘Well, you know, you’re busy’, therefore you can’t really have that kind of influence,” he told Reuters.

Slideshow ( 10 images )

Sisi overthrew Mohamed Mursi, Egypt’s Muslim Brotherhood president, in 2013 after widespread protests and is all but guaranteed to win the March 26-28 vote against an opponent who has praised, not challenged, him.

Sisi shares Saudi Arabia’s opposition to the Brotherhood and has largely aligned Egypt with Riyadh and the UAE, joining their boycott of Qatar and supporting, to a limited extent, their fight against Iran-allied Houthi fighters in Yemen.

Although Sisi steered a separate course over Syria, choosing not to follow Riyadh’s hawkish line against President Bashar al-Assad, his agreement to hand two Red Sea islands to Saudi Arabia reinforced the sense that Cairo had become a junior partner.

With its population nearing 100 million, almost a quarter of the Arab world, Egypt’s stability remains crucial to the region, but it rarely takes the lead now when crises unfold.

When President Donald Trump announced in December he was moving the U.S. embassy in Israel to Jerusalem, Sisi criticized the decision but it was Turkey, not Egypt, which called an emergency summit of Muslim leaders to condemn the move.

NARROWED HORIZONS

In his first term of office, Sisi has strengthened ties with Russia and China, trying to reduce dependence on a four-decade partnership with the United States which has brought Egypt tens of billion of dollars in aid.

Egypt’s most pressing foreign policy concerns, however, lie just across its borders. To the west, the chaos of Libya since Muammmar Gaddafi’s overthrow seven years ago has created a dangerous security threat on Cairo’s doorstep.

To the east, Palestinian rivalries have created instability in Gaza - though that is overshadowed by the crisis in the neighboring Sinai, where Egyptian troops are battling jihadists.

Looking south, Cairo is alarmed by Ethiopia’s construction of a dam on the Nile, threatening the water supply on which nearly all Egypt’s agriculture depends. Ethiopia announced the start of work weeks after Mubarak was overthrown, when Egypt’s domestic turmoil left it few options to respond.

For now Egypt “will be forced to deal with the fires that are raging around us because they create a sense of urgency,” Fahmy said.

Domestic priorities, set by Egypt’s dominant military establishment, have also narrowed the horizons for Cairo’s diplomacy, a Western diplomat said.

“Nile water, Libya and Gaza are the three key issues it cares about,” the diplomat said. “All are driven by the internal agenda rather than a desire for a regional role.”

The primary reason for Egypt’s involvement in Gaza, where it has tried to broker reconciliation between rival factions, is security, the diplomat said.

Egypt’s foreign ministry has said it views Israeli-Palestinian peace as an urgent priority.

Foreign Ministry spokesman Ahmed Abu Zeid said both Libya and Gaza were primarily security issues.

Egypt is trying to reduce smuggling of weapons and militants across its 1,200 km (750 mile) desert border with Libya, he told Reuters, while in Gaza it wants to help pacify the territory and mediate between Gaza’s ruling Islamist Hamas movement and the Palestinian Authority in the West Bank.

The Middle East faces huge security and humanitarian challenges, Abu Zeid said, and “by default this requires more attention to security issues.”

Former minister Fahmy, who was involved in negotiations between Israel and the Palestinian Authority after the 1993 Oslo accords, said turmoil since the Arab Spring uprisings seven years go meant Egypt has some way to go to regain its influence, but there was still room for Cairo to find a role.

“(Our) niche was we were the pro-active guys,” he said. “So as difficult as these years have been, I actually think it’s driven us to take charge of our own problems again and to engage in the different issues around us.”