In the present conflict with Hamas, the national interests of Egypt, Saudi Arabia and the Gulf states – with the exception of Qatar – appear identical to those of Israel.

Hamas, an offshoot of the Muslim Brotherhood, is the enemy of these countries and threatens their stability. This has led some people in Israel to dream of a coalition against Hamas.

Yet do these countries share the same view? It is far from certain.

The Middle East can be likened to shifting sands leading to an ever changing landscape.

Saudi Arabia, for instance, is making an all-out effort to mend fences with Qatar, to the extent, perhaps, of no longer asking the small emirate to divorce itself from the Muslim Brotherhood and expel its members.

For Riyadh, keeping the Gulf Cooperation Council, which it leads, focused on Iran is of paramount importance. Qatar, however, is unwavering in its support for the Muslim Brotherhood and its hostility to Egyptian President Abdel Fattah al-Sisi; Al Jazeera is pursuing a relentless campaign of incitement against Egypt.

This is unacceptable not only for Saudi Arabia but also for the other Gulf states.

They all tried to exert pressure on Qatar to expel Brotherhood members – among them Sheikh Qardawi – from its soil. However, the emir turned a deaf ear and would not budge, even when Saudi Arabia, Bahrain and the UAE recalled their ambassadors from Doha, as Egypt had been the first to do.

In April, the foreign ministers of the Gulf states convened in Riyadh and agreed on a draft resolution, in effect, calling on Qatar – but without naming it – to stop its subversive activities against other Gulf countries.

The draft was adopted unanimously, Qatar agreeing to what was then called “The Riyadh Agreement.”

The exact steps to be taken were not made public in order not to embarrass the emir.

However, a special committee was set up to check that he was complying. He did not, according to a report leaked to Asharq al-Awsat, a Saudi daily published in London.

The issue is to be dealt with at the next meeting of Gulf state foreign ministers on August 30 in Jeddah. It is not clear whether a compromise leading to the return of the ambassadors will be found – and if not, will the Gulf states go a step further and cut off relations with Qatar.

Saudi Arabia had tried to find a common ground two weeks ago by calling an extraordinary meeting of the organization of Islamic cooperation and drafted a resolution condemning “Israel’s aggression in Gaza.” Qatar readily agreed and thus a “United Islamic stand for solidarity with Gaza” was born.

A few days later, Saudi Arabia convened the foreign ministers of the Gulf Cooperation Council and a common declaration was issued regarding current issues, as well as praising Egypt for its efforts to achieve a cease-fire. Qatar agreed to the declaration, signaling that both sides were looking for a compromise.

The Muslim Brotherhood, fleeing the wrath of Egyptian president Abdel Nasser – whom it had tried to assassinate – had arrived in 1954 in Saudi Arabia and in Qatar.

The group was welcomed in both countries, which saw it as “Islamic intellectuals” who would help develop their fledgling religious and educational institutions.

Qatar, at the time, was a small, undeveloped Beduin emirate. The Brotherhood set up a religious and educational network and promoted its own brand of Islam calling for the restoration of the Caliphate. They even set up a local branch of the Muslim Brotherhood, which they eventually disbanded in order not to provoke antagonism.

It did not prevent them from acting “individually” – Sheikh Qardawi, the spiritual leader of the movement, who lives in Doha, has a weekly program on Al Jazeera called “Life and the Shari’a,” and until last year, the director of the TV channel was a Brotherhood member himself. Incidentally, Hamas leader Khaled Mashaal lives in Doha, as do many Brotherhood members who had to leave Egypt following president Mohamed Morsi’s downfall.

Though Saudi Arabia was more developed, the Brotherhood still managed to infiltrate the educational system, taking over most of the field of higher education. They taught Islamic studies at Jeddah University; among their students was one Osama bin Laden, who went on to create al-Qaida, with thousands of Saudi youngsters following him.

After time, a rift opened between the Brotherhood and the royal family and deepened during the First Gulf War, with the Brotherhood opposing the cooperation between the kingdom and the Americans against Iraq and protesting the presence of American troops on “sacred Islamic soil.”

Then came 9/11 and the Saudi establishment was struck dumb when it was revealed that 16 of the 18 perpetrators were Saudis from good families. The Muslim Brotherhood was immediately kicked out of the kingdom and went straightaway to Qatar.

Saudi Arabia thus sees Qatar as the home base of the Muslim Brotherhood, a direct threat to the stability of the Gulf states and the weakest link in the front against Iran and Sunni radical organizations. It should be remembered that in the beginning that Riyadh gave its support to Hamas and al-Qaida – until it understood how dangerous these organizations were. Today, Hamas and Hezbollah are branded terror organizations in Saudi Arabia, and Saudi citizens who join jihadi organizations are liable to long prison periods.

Then there is Egypt, Saudi Arabia’s closest friend since Sisi took over. Both countries are fighting radical Islam and depend on one another. Egypt needs financial help from Riyadh, which needs political support from Cairo.

Should either fall to the terrorists of Islamic State or al-Qaida, the other would be left bereft. Egypt is being targeted by Islamic terror in Sinai and along its border with Libya.

Cairo sees Gaza as the fountain of terrorism in Sinai; Hamas is under judicial investigation and is forbidden to act in Egypt.

Egypt is currently the strongest link in the virtual coalition against Hamas, yet there is a powerful feeling of empathy towards the Palestinians and hostility towards Israel that has not abated.

That hostility expresses itself daily in Egyptian and Saudi media. Riyadh sees the danger of the Brotherhood, but desperately tries to keep the Gulf states – and Qatar – together.

As to that emirate, it appears determined to maintain its special relationship with the Brotherhood at the expense of its relations with its neighbors.

Nothing is ever simple in the Middle East, and a common interest and a common enemy are not always sufficient to cement an alliance with people and countries with different beliefs and traditions.

The writer, a fellow of The Jerusalem Center for Public Affairs, is a former ambassador to Romania, Egypt and Sweden.

Please LIKE our Facebook page - it makes us stronger