The Hamas leadership “panicked” as news of the military operation to oust Turkish President Recep Tayyip Erdogan came in on Friday, a top official in the movement told Breitbart Jerusalem.

Late Friday night, when it seemed like the coup d’état was materializing, Hamas leaders feared they were about to lose their chief supporter, and the most fervent proponent among world leaders of lifting Israel’s siege of the Gaza Strip, he said.

“The Turkish president wasn’t only a friend of Hamas, but a bulwark that fended off international and Arab pressure on us,” a Hamas leader said.

During the first hours of the upheaval in Turkey, Hamas leaders in Gaza and Qatar were in ongoing contact with the movement’s office in Turkey.

“With every report of a takeover of a TV channel and every announcement of the plotters, the anxiety level in Gaza and Qatar rose,” he said, adding that it was exacerbated by reports in the Arab media that were overwhelmingly celebratory.

“When reliable news sources report that President Erdogan has sought asylum in Germany, no wonder people get stressed,” he said. “It became real when he was addressing the masses on his mobile phone, indicating the great distress he was in.”

Just before dawn on Saturday, when it emerged that the coup had met with difficulties and that the masses were taking to the streets in support of their president, “Hamas sounded a sigh of relief and invited the masses in Gaza to come out to the streets in support of the Turkish leadership.”

Fatah, for their part, called on Hamas to be consistent on the issue of coups d’états. “On the one hand, Hamas condemns the attempted coup in Turkey and celebrates its failure, while on the other here in Gaza it hangs on to the power it got by violent means,” spokesperson Usama Kawassmeh said.

He added that Fatah condemns violent coups as a political tool and believes in democratic elections.

“We call on Hamas to allow the democratically elected government to do its job,” he said. “If you’re against coups, you’d better retreat from yours first.”