A meeting between Egyptian officials and representatives from the Hamas terror group was the outcome of Saudi mediation, a Hamas political leader reportedly said.

Hamas sent a team of high-level officials to Cairo on Sunday, including deputy political bureau chief Moussa Abu Marzouk, to meet with Egyptian Intelligence Minister Khaled Fawzi in a bid to restore fraying ties.

The meeting followed accusations by Egypt that the Gaza-based group was supporting the Islamic State’s branch in the Sinai Peninsula and that Hamas, along with the Egyptian Muslim Brotherhood, was behind the June 29, 2015, assassination of Egyptian chief prosecutor Hisham Barakat.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Ahmed Yousef, a senior Hamas political leader, told the news site AlKhaleejOnline that Saudi Arabia had stepped in to repair souring relations between the two sides.

“The Custodian of the Two Holy Mosques, King Salman Bin Abdulaziz, has through his contacts greatly helped ease the tense atmosphere between Hamas and Egypt,” Yousef told the news site.

The Jordanian news site Albosala also quoted a source that said the meeting was the outcome of official mediation by Saudi Arabia.

Hamas has recently been shifting its allegiance toward the Saudis and away from Iran, the terror group’s longtime backer and an arch-rival of the Gulf kingdom, according to reports.

Back in January, Hamas political bureau chief Khaled Mashaal reportedly rejected an Iranian offer to restore full financial backing for the Gazan group. Iran asked Hamas to officially declare its allegiance to Iran in the wake of Saudi Arabia’s execution of Shiite cleric Nimr al-Nimr earlier in the month.

The report said that Mashaal was reluctant to commit to such a move, fearing that Hamas would lose its support among Sunni Arab states.

Mashaal made a rare visit to Saudi Arabia last July, where he met with Saudi king Salman bin Abdulaziz and other top officials in Riyadh. A Hamas source told Reuters “the delegation discussed Palestinian unity and the political situation in the region. This meeting will hopefully develop relations between Hamas and Saudi Arabia.”

Relations between the Gaza-based terror group and Iran have been shaky since the Palestinian organization came out against Syrian President Bashar Assad, a key Iranian ally, and left its headquarters in Damascus with the outbreak of the country’s civil war in 2011.

Hamas denies helping IS in Sinai, distances itself from Muslim Brotherhood

During the meeting in Cairo, Hamas vigorously denied any involvement in the assassination of the Egyptian prosecutor Hisham Barakat and demanded evidence linking the group to the events, a source from Hamas told the news site alQuds.

The Gaza-based terror group also downplayed its ties to the Egyptian Muslim Brotherhood.

“Though we are influenced by and emerged from the books, principles and legacy of the Muslim Brotherhood, we do not use this relationship to harm Egypt. We are a resistance movement and we do not intervene in internal Egyptian affairs. The day will not come when we become part of the organizational structure of the Muslim Brotherhood,” the Hamas delegation told the Egyptians.

Hamas also stressed that it would work with Egypt to prevent “terrorists from infiltrating the Gaza Strip through the tunnels and taking refuge in it,” according to the report.

Israel, alongside the Egyptian government, has accused Hamas of lending support to the Islamic State in the Sinai Peninsula.

In February, Maj. Gen. Yoav Mordechai, the head of Israel’s Coordination of Government Activities in the Territories unit, said that IS operatives entering Gaza through tunnels from Egypt were receiving medical treatment in the Strip. In return, said Mordechai, the Islamic State supplies Gaza’s terrorist rulers with money and weapons.

Avi Issacharoff, Judah Ari Gross and Times of Israel staff contributed to this report.