Two young government workers had set up shop in the patio section of an Ace hardware store the other day, and many Israelis were waiting. The product: free gas masks, from a dwindling national supply that is set to dry up by month’s end.

When that day comes, nearly 40 percent of Israelis will still lack masks. More than half that figure has no access to bomb shelters. And there appears to be more reason than ever to have both: Prime Minister Benjamin Netanyahu warned sharply this week that he reserved the right to unilaterally strike Iran’s nuclear facilities, an act officials and analysts warn would trigger a retaliatory spray of rockets and missiles onto the economic hub of Tel Aviv and other populous coastal districts.

That ominous prospect has some critics here slamming the mask and shelter shortage as woeful neglect of Israeli civilians, who for most of the nation’s turbulent 64-year history have been far from the front lines. Others view it as a evidence that the escalating threats of war are more bluff than plan, or that the closely guarded Israeli war calculus envisions a quick and punishing strike likely backed up by the United States.

But the shortages also point to Israel’s rocky transition from a long-held military paradigm that prioritized attack capabilities to one that also stresses defense of a home front under siege. Israeli officials say the need became clear during a 34-day Lebanon war in 2006, when Hezbollah militants’ rockets pounded northern Israeli cities, and it was underscored last week, when a torrent of rockets launched from the Gaza Strip froze life in southern Israel for days.

Most people here dismiss the prospect that Iranian retaliation would cause massive Israeli casualties. But a shower of missiles on Tel Aviv and the surrounding areas, home to the majority of Israelis, could paralyze the economy and trigger panic.

A successful strike on Iran “will depend on our capability to withstand an onslaught on the heart of Israel,” said Uzi Rubin, the former director of the Israel Missile Defense Organization. “We have to be ready for a flare-up . . . but we are still way off.”

Iran and the allies who might come to its defense, including Syria, Hezbollah and Palestinian militants in Gaza, have expanded the size and power of their arsenals in recent years, and Tel Aviv is now in the cross hairs, experts say. Maj. Gen. Aviv Kochavi, Israel’s military intelligence director, said recently that 200,000 rockets and missiles in the region could strike inside Israel.

That includes about 50,000 short-range weapons stockpiled in Lebanon by the Iranian-backed militant group Hezbollah — nearly four times the number the group had in 2006, according to Israeli military estimates. Palestinian-backed militants in Gaza have 10,000 rockets, the military says. Iran itself is believed to possess several hundred medium-range Shahab missiles, and Syria thousands of various kinds of warheads, including chemical weapons — one reason the Israeli government pledged to provide its population with gas masks.

Confidence in Israel’s defensive capacity rose last week, when a new short-range missile interceptor system blocked a large majority of the rockets headed for population centers, helping prevent any Israeli fatalities. Known as Iron Dome, the system was derided by military officials as a waste of money when first proposed, but it was extolled as the hero of the recent Israel-Gaza clashes.

But Iron Dome — one of four multibillion-dollar, partially U.S.-backed systems designed to thwart missiles of various ranges — is deployed only in three sites in southern Israel, and a site near Tel Aviv is to be added in the coming weeks. Another system designed to stop mid-range Iranian missiles, Arrow II, has not been tested in battle. How either system would cope with sustained fire is uncertain, defense analysts say.

In any case, critics say the systems and other big-ticket equipment should not take priority over what is known here as “passive defense.” Those measures, including gas masks and bomb shelters, should come first, as should as well as emergency response plans, said Rubin, who once led the Arrow program.

“It’s going to be a very good defense for the people of Israel, but unfortunately it’s not 100 percent,” Ze’ev Bielski, a lawmaker who chairs the parliamentary subcommittee on home-front defense, said of the missile shields.

Military and defense officials have said little to temper the concerns.

An official in the ministry of home-front defense, who was not authorized to speak publicly, said Israel has made strides in coordinating responses for all sorts of potential emergencies, from earthquakes to war. But exigency has not been reflected in budgets, the official said.

“We need to change the way of thinking in Israel about this kind of thing,” the official said.

In a nation that views itself as one large family, even a small number of civilian deaths would be viewed as disastrous, Bielski said.

But there is little sense of urgency. A government plan to provide homeowners incentives to build bomb shelters has fizzled, leaving 24 percent of the population without access to shelters, and funding for gas masks is short by nearly $300 million, Bielski said. Itay Baron, deputy director general of one of the nation’s two gas mask factories, said the plant is operating at 7 percent capacity and has laid off one-third of its workers in the past three months.

Amid furious speculation about the imminence of an Israeli strike, some view those data points as evidence that Netanyahu’s crescendoing war talk is largely bluster. Other officials and analysts reject that but grant that they might be a barometer of Israeli confidence that Iranian retaliation would be minimal. Defense Minister Ehud Barak recently asserted that there could be fewer than 500 Israeli civilian casualties “if people stay in their homes.”

Against that backdrop, some Israelis are moving to protect themselves. After the Lebanon war, the Sourasky Medical Center in Tel Aviv — not far from a presumed missile target, Israel’s military headquarters — decided to build an underground parking lot that can be converted to a 700-bed hospital in case of war. It has an air filtration system to protect patients from chemical attack. Hospital staffers have been assigned roles as “commanders,” to control chaos, said hospital director Gabriel I. Barbash.

The $45 million cost was mostly privately funded, Barbash said.

“The Israeli government’s long-term planning is deficient,” he said. “We had to take the initiative.”

At the Ace store, people lined up to collect cardboard boxes containing gas masks available in three sizes: adult, child and infant. In a video screening on a nearby television, demonstrators buckled a baby into what looked like a tiny plastic space suit.

Dror Bahar, a jovial 40-year-old video editor who said he had recently moved to a house with a safe room, was there to get one for his 8-month-old daughter. Netanyahu and Barak are “reasonable,” he said, and would not rush into war. Yet he spoke as if the prospect were inevitable.

No matter who carries out a strike on Iran, he said, “Israel is going to be hit anyway.”

Special correspondent Samuel Sockol contributed to this report.