The head of the political bureau of Hamas, Khaled Meshaal, is set to mediate between the Saudi capital Riyadh and the Muslim Brotherhood-affiliated Islah party in Yemen, political sources said on Sunday.

The mediation, the sources said, was being made at the request of Saudi Arabia, which has been alarmed at the possibility of a power struggle in Yemen, something that might negatively affect the Gulf.

The sources added that Meshaal enjoyed close ties with Yemen’s Muslim Brotherhood, and that his role as mediator was specifically requested by the Saudi monarch King Salman bin Abdulaziz, as well as other high-ranking Saudi officials.

The Defence Minister Prince Mohammed bin Salman, the Crown Prince Sultan bin Abdulaziz, and Deputy Crown Prince Mohammed bin Nayef all contacted Meshaal to ask him to mediate between Riyadh and the Islah party because of his close relations with the latter.

This move signals that a thaw in relations between Riyadh and Hamas, an ideological offshoot of the Muslim Brotherhood, is taking place.

Egyptian writer Fahmi Huweidi said that Meshaal had told him that relations between Hamas and Saudi were starting to go back to normal after four years of tension.

“Meshaal spoke with King Salman of Saudi Arabia in person, which could pave the road for a future visit [by the Hamas official] to Riyadh,” Huweidi told the Anadolu Agency.

Hamas sources have told the al-Araby al-Jadeed news website that Saudi officials conveyed to Hamas the message that the kingdom does not consider the movement as an integral part of the Muslim Brotherhood- and therefore not a terrorist group - contrary to Egyptian President Abdel Fattah el-Sisi’s opinions of the Gaza-based movement.

Egypt has labelled Hamas as a terrorist organisation, but an appeals court hearing is set to take place later this month to see whether the decision will be overturned or not.

The more that Saudi Arabia warms to Hamas, the more it is likely that Saudi will pressure Cairo in some form or another to reopen the Rafah border crossing with Gaza.

However, a senior political source in Hamas has denied that the Palestinian movement is mediating between Riyadh and Islah, according to the website Arabi21.com.

The source, who requested to remain anonymous, said the news may have fabricated by parties that wish to sow mistrust between Saudi Arabia and Hamas, just as relations between Riyadh and the Palestinian movement appear to be improving, albeit very slowly.

Meanwhile, a media official who is close to the Saudi authorities also denied to the same website the presence of such mediation, noting that Riyadh already has communication channels open with the Yemeni party for some time.

Yemen has been in a state of chaos since last September, when the Shiite Houthi militia overtook the capital Sanaa, from which they have since sought to extend their control to other parts of the country.

The Houthis dissolved parliament and established a 551-member transitional council instead, describing their actions as a “constitutional declaration.”

The declaration, however, was rejected by most of Yemen’s political forces, along with some neighbouring Gulf countries, which described it as a “coup against constitutional legitimacy.”