GAZA CITY and RAFAH, Gaza Strip — It was a sweltering summer day on the border with Egypt when Hamas Prime Minister, Ismail Haniya, sent one of his strongest messages yet to the Arab neighbor to the south.

“This Rafah crossing is Gaza’s gateway to the world,” Haniya said at the July 12 inauguration of the sleek new passenger terminal at the Gaza-Egypt border, boldly calling on Egypt to lift its restrictions at Rafah. “Gaza needs the will of Tahrir Square to liberate it.”

That rhetoric fell flat with Egypt, after a deadly attack on Egyptian soldiers in the Gaza border region less than a month later prompted officials to shutter the border with the Hamas-run enclave.

But despite the setback, Rafah has served as Hamas-run Gaza’s portal to the outside world. In October, for example, it enabled an extraordinary, high-profile visit from the crown prince of Qatar.

More from GlobalPost: In-depth: Hamas and the business of resistance

Before the current Israel-Gaza violence, the Hamas government’s clout and power were on the rise. Formerly a regional outcast, it had received cash pledges from Gulf countries — bolstering a rapidly growing economy.

That newfound power is now undergoing a crucial test after Israeli air strike killed the group’s top military commander in the Gaza Strip on Wednesday, and Hamas leaders have vowed to respond.

The operations are the largest in Gaza since Israel’s war there in 2008-2009, when Hamas was a political pariah on the world stage.

“Something is changing now in the Arab world with regards to Hamas,” Hamas government spokesman, Taher Al Nounou, told GlobalPost prior to the current violence. “The Arab countries, and even officials from European countries, are ready to deal with us, more than before. All of them believe now that there is no way to isolate us.”

Hamas, considered a terrorist organization by some Western countries, was placed under a severe Israeli-Egyptian blockade in 2007, after it won power in democratic legislative elections. Even in Arab nations ostensibly sympathetic to the Palestinian cause, the group’s leaders were considered personae non-gratae.

But as international sanctions sought to weaken Hamas, the organization used the blockade to build a financial empire in Gaza — largely taking advantage of the myriad smuggling tunnels under its border with Egypt. This in turn helped strengthen its grip on power.

The popular uprisings sweeping the Middle East emboldened Hamas, and ousted regional autocrats hostile to the Islamist movement.

In January, Haniya and other Hamas officials embarked on unprecedented visits to Egypt, Tunisia, Turkey and even Switzerland to shore up their diplomatic credentials.

Hamas’ exiled political leadership opened offices in the Qatari capital, Doha, and the ruling Politburo’s deputy, Moussa Abu Marzouk, set-up an additional bureau in Cairo.

In addition to a visit paid by Hamas’ former leader, Khaled Meshaal, to Jordan — the first since the movement was ejected from the desert kingdom 13 years ago — Qatar’s crown prince led the first head-of-state delegation to Hamas-run Gaza since 2007.

“The Qatari emir's visit to Gaza is indeed a massive boon to the Hamas regime there, and not just financially,” Issandr El Amrani, a Cairo-based political commentator, wrote on his influential blog, Arabist. “They have wanted, and the international community has denied them, the kind of formal recognition this [visit] grants for years.”

The Arab revolts have not always been a boon for Hamas, which tussled early on with the regional political fallout and domestic unrest.

In March 2011, the Hamas-led government cracked down violently on peaceful protesters calling for an end to the division between Hamas in Gaza and Fatah in the West Bank.

Relations with Egypt, even under supposed ally and Muslim Brotherhood president, Mohamed Morsi, remain tense as the Egyptian leadership grapples with insecurity in the Sinai region that borders Gaza.

Also, Meshaal, the former Hamas chief, was forced to leave his longtime political base in Syria following a bloody crackdown by regime forces against protesters there.

The move angered Meshaal’s financial patron, Iran — which is reported to have reacted by slashing funding to Hamas. Some observers said Hamas would struggle to recover.

But the group is emerging as one of the key beneficiary of hundreds of millions in funds from the majority Sunni Gulf, rewards for ditching Shiite Iran as sectarian narratives harden over the conflict in Syria, some analysts say.

And power shifted easily from Meshaal and his Damascus-based associates to the movement’s more durable and more profitable base in Gaza, which is pressuring Egypt for greater political recognition and economic gains.

On Wednesday, Egypt’s leadership strongly condemned Israel’s strikes on Gaza. But whether or not they would formally side with Hamas against Israel, with whom they maintain a peace treaty, remained to be seen.

“The real effect on the situation in Gaza will come from Egypt, but not a direct change just yet,” Al Nounou said, conceding there are tensions between the two sides. “They give us some political support, but nothing else.”

In Gaza, a coastal district of just 1.7 million Palestinians, the Hamas-controlled economy brings the government hundreds of millions of dollars in revenue each year.

Residents here and in Egypt say Hamas uses that money to help buy the commercial loyalty of Bedouin tribes in Egypt’s North Sinai Peninsula, where links to the still-thriving tunnel trade have provided livelihoods in an otherwise neglected and impoverished region.

During Egypt’s uprising in January and February 2011, Bedouins routed Egyptian police from the restive Sinai region. In the wake of that uprising, Hamas was better placed to use its growing authority as leverage in negotiations over the Rafah border, or in Cairo-brokered reconciliation talks with Fatah in the West Bank.

While Egypt has taken measures to stifle the tunnel trade, and has largely abandoned its promises to open Rafah to normal passenger traffic, Cairo is now more than ever in a position where it must consult with Hamas leadership over developments in the border area.

Hamas is still beholden to Egypt to facilitate its relatively new access to patron states, but fresh support from regional heavyweights like Qatar and Turkey is furnishing the movement with additional influence.

“This must be a difficult thing for Egypt to swallow: Qatar, which is lending $2 billion this calendar year alone to support the Egyptian pound, is doing more politically and financially for Gaza than Muslim Brotherhood Egypt has,” El Imrani wrote.

Eyad Sarraj, Gaza-based rights activist and consultant to the Palestinian delegation to the Camp David peace accords, says Hamas leaders had long predicted they would rise to prominence in the region.

But now under fire from Israeli warplanes, that sentiment could change.

“Two years ago, before Egypt and Tunisia [revolutions], the Hamas interior minister told me the Arab regimes working against the will of their people will fall, and that Hamas would the beneficiary,” he said.

“He was right,” Sarraj said. “And now, their morale is high.”