Emad Firi is angry. During last summer's Israel-Hamas war, a shell slammed through the roof of his house and shredded his right leg. Unable to work, Firi's son now drives his taxi but the family struggles to survive.

The 50-year-old blames Israel, but also the Islamic militant group Hamas which has ruled Gaza since a violent takeover in 2007. In the Hamas era, the tiny territory has endured three wars with Israel and a crippling Israeli-Egyptian border blockade that keeps most of its 1.8 million residents trapped.

"Who is not angry about this difficult situation?" Firi said, waiting at a rehabilitation clinic to finally to be fitted with an artificial leg.

But the people of Gaza won't rise up — some out of fear, he said. "If I say two words, I may go to prison," he says, as Hamas has little tolerance for dissent and often detains critics. "So we stay silent."

A year after the most destructive war in Gaza yet, Hamas remains in control — despite signs of mounting frustration and a poll indicating half the residents would emigrate if borders were open.

No alternative to Hamas rule has emerged, after deep-seated rivalries between Hamas and Palestinian President Mahmoud Abbas derailed attempts to set up a unity government in both the West Bank and Gaza.

Hamas can also rely on unwavering support from about one-third of the population, polls indicate.

At the same time, Israel and Egypt have signaled a policy shift, from trying to weaken and perhaps topple Hamas, including by enforcing the blockade over the past eight years, to containing the group.

Egypt's military temporarily opened the border crossing with Gaza in recent days. Thousands left Gaza for the first time in months, while shipments of desperately-needed cement entered the territory. Egypt said it acts according to changing security assessments, while Hamas officials said they were promised a further easing.

Meanwhile, Israel relaxed its stringent movement restrictions for Gaza residents, amid reports that foreign diplomats are carrying messages between Israel and Hamas on a long-term cease-fire deal.

Israeli officials have also struck a new tone. The outgoing top army commander dealing with Gaza, Maj. Gen. Sami Turgeman, has said recently that Israel and Hamas have some shared interests, while leading right-wing Cabinet minister Naftali Bennett said the Hamas presence in Gaza is a reality. It's not a matter of reconciling with it (Hamas rule) or not," he told Israeli TV's Channel 2 over the weekend. "I see that they (Hamas) are there."

Israel and the West have branded Hamas, which is sworn to Israel's destruction, as a terror group.

Salah Bardawil, a Hamas spokesman, said he believes Egypt and Israel have become "more realistic." They "realized that they can't reach their goals by violence and force," he said.

Hamas' biggest problem currently is lack of funds, after Egypt shut down hundreds of smuggling tunnels under its border with Gaza two years ago. The tunnels delivered cheap fuel and cement, powering key sectors of the economy, while Hamas earned tens of millions a year taxing the smuggled goods.

The tunnel closures triggered Hamas' worst-ever financial crisis, leaving it unable to cover its $30 million-a-month payroll for 40,000 civil servants and security forces.

Last year, Hamas agreed to step aside in Gaza for a "national consensus government" led by Abbas — whose forces were defeated by Hamas in 2007 — in hopes of solving the cash crisis. Yet disputes prevented the government from taking control in Gaza.

Since May, Hamas, which is believed to receive aid from Iran, has stepped up its hunt for new revenues.

It has imposed new import fees on goods entering Gaza through the Kerem Shalom crossing with Israel, including a 25 percent custom on cars.

Ziad Zaza, a former Hamas finance minister, said Abbas' government in the West Bank earns about $80 million a month in customs from the crossing — money Hamas feels should flow into its coffers.

Gaza traders, already paying 50 percent in car customs to Abbas, had to comply after Hamas held up 265 cars at the crossing. Ismail Abu Nakhala of the importers' association said Hamas stands to make almost $1 million a month from the new fees.

Gaza City car dealer Alaa Badwan expects a drop in business since retail prices are bound to rise. "In this situation (in Gaza), there is no room for additional taxes," he said.

Half the work force is unemployed. It doesn't help that large firms and other potential employers are often hampered by politics.

Hamas demands taxes from large West Bank-based firms with branches in Gaza, such as telecoms operator Jawwal. Last week, the Gaza attorney general threatened to close the Jawwal headquarters in Gaza unless the company pays up. Meanwhile, company officials have said Abbas' government asked them not to pay taxes to Hamas.

Despite rising prices and potential backlash from higher taxes, a former Hamas official said the group has to raise money to provide services in Gaza, including security.

"We collect the minimum to survive," former official Ahmed Yousef said. Zaza mainly blamed price hikes on Gaza's involuntary switch from cheap Egyptian fuel smuggled through tunnels to pricier Israeli gas.

Market vendor Abu Maher Mourtaga said business is down because of the double burden of rising prices and a drop in purchasing power. At his stall, the price of nuts is up 50 percent from last year, now $15 a kilogram (about $6.80 a pound). A five kilogram (11 pound) box of dates is now $16, compared to $13 a year ago.

A June poll by the independent Palestinian Center for Policy and Survey Research reflected growing frustration. Fifty percent of Gaza residents are considering emigration, up five points from previous surveys, and 63 percent are dissatisfied with the results of war, said the survey among 1,200 people with an error margin of 3 percentage points.

During the 50 days of fighting, which began July 8, Israel launched more than 6,000 airstrikes against Gaza, while Hamas fired more than 6,600 rockets and mortars at Israel.

The war killed more than 2,200 Palestinians, mostly civilians, and damaged or destroyed 141,000 homes, according to U.N. figures. Israel counted 73 deaths, including six civilians

A recent U.N. investigation concluded there's suspicion both sides committed war crimes, pointing to indiscriminate Gaza rocket attacks on Israel and heavy Israeli firepower used in densely populated Gaza areas.

United Nations officials say the pace of reconstruction is too slow, with no homes being rebuilt from the ground up yet. Roberto Valent, local head of the U.N. Development Program, blamed the slow flow of foreign aid and curbs on building material imports dictated by Israeli security concerns.

Tens of thousands are still displaced, while others live in damaged apartments.

"Siege is siege and nothing has changed," said Fadi Jundia, 29, who lives with 12 people on the damaged ground floor of his family home in Gaza City, after the upper floors were destroyed by shelling. "We went back 100 years."

Some make a meager living from the rubble, with less than half of the 2 million tons of war debris removed so far. Maisera Khouli, 24, collects rubble with his donkey cart, selling each of his three or four daily loads for $1.25. With food for the donkey costing $2.50 a day, there's little left over. Khouli said he'd gladly leave Gaza for a decent job.

What construction there is eases public pressure on Hamas.

A new housing complex being built on former Jewish settlement lands is funded by Qatar, the biggest foreign donor to Gaza. Qatar is supervising the $140 million project directly, rather than going through Hamas. Still, the construction of 3,600 apartments — along with two four-lane highways Qatar is paving — creates jobs and meets local needs.

While many are struggling, Hamas takes care of its own businesses.

Its Al Aqsa TV station, destroyed by an Israeli strike, was swiftly rebuilt for $600,000. Bardawil, the Hamas spokesman and head of the station, said Al Aqsa even managed to produce a 30-part series, "Freedom Fighter," for $100,000 in time for the holy month of Ramadan, when families watch TV serials together after breaking their daily dawn-to-dusk fast.

As in previous crises, the militants' strategy is to survive day to day and wait for a regional re-alignment that could ease its isolation. One analyst warned another war could easily erupt because restrictions on Gaza have not been lifted since Hamas gambled on war in 2014 as a way to break the border blockade.

"At present, the main actors, Hamas and Israel, don't want another war," said Nathan Thrall of the International Crisis Group think tank. "(But) in a year or two years, all policies are pushing Gaza to another war."

___

Associated Press writers Ian Deitch in Jerusalem, Mohammed Daraghmeh in Ramallah, West Bank and Sarah El Deeb in Cairo contributed to this report.