HAIFA (JTA) — When missiles rained down on northern Israel from Lebanon six years ago, surgeons at Rambam Hospital in Haifa worked, terrified, on the building’s eighth floor.

That summer, missiles had struck fewer than 20 yards away, endangering the staff and patients of northern Israel’s largest hospital and the central facility for treating soldiers injured in the fighting.

“There wasn’t even a bomb shelter because we thought they’d never bomb a hospital,” said David Ratner, Rambam’s spokesman. “We weren’t ready. The message we got was that we needed to become a hospital that could treat people under attack.”

The experience has pushed Rambam’s wartime operating room a dozen stories down, to the third level of an underground parking garage that will become, should bombs fall again, one of the world’s largest emergency hospitals. At 645,000 square feet, the three stories will house 2,000 medical stations — enough to care not only for those wounded physically or psychologically from the war zone, but also for the most critically ill inpatients and outpatients needing regular treatments like dialysis.

“This changes us from a laid-back hospital to a machine,” Ratner told JTA. “People aren’t going to stop having babies” during a war.

As tensions between Iran and Israel heat up, and amid fears that Syria’s civil war could spill over into Israel (in a first since the war began, Syrian shells landed in Israel’s Golan Heights last month), Israeli cities and institutions like Rambam are planning for a potential repeat of the missile fire seen during Israel’s 2006 war with Hezbollah.

Any war with Iran is expected to prompt retaliatory strikes by Hezbollah, the Iranian proxy militia in Lebanon, and possibly by Hamas, which controls Gaza and has received funding and weaponry from the Islamic Republic.

In 2006, northern Israel was caught largely unprepared for war. For six years before that, following Israel’s 2000 withdrawal from Southern Lebanon, the region enjoyed relative quiet. But more than 4,000 missiles were fired at Israel during the 34-day 2006 war, prompting massive numbers of residents to flee their homes and leaving 163 Israeli soldiers and civilians dead. On the Lebanese side, there were more than 1,000 dead.

In the six years of quiet that have followed the war, area residents say they have remained on guard. Nahariyah, a city of more than 50,000 on Israel’s northern coast situated less than 10 miles from the Lebanese border, suffered hundreds of rockets and two deaths in the 2006 war.

Since then, the city has improved its emergency services by renovating its bomb shelters and implementing its part of a national attack alert system. Nahariyah’s hospital, like Rambam, has an emergency underground wing. But Izik Moreli, manager of Nahariyah’s security division, said the unpredictable nature of a terrorist threat means that the city may never be fully prepared for war.

“I think we’re much more prepared,” Moreli said. “But I hope we don’t encounter things we don’t expect, like we did in 2006.”

Security officials in the North credit Israel’s streamlined Home Front Defense Ministry, part of the Defense Ministry, for spearheading the improvements, including the national alert system, drills to prepare for crises, and improved oversight and evaluation of emergency preparedness.

In mid-September, the Israel Defense Forces conducted a surprise drill in the Golan Heights simulating a response to an attack there.

The Home Front Command, created in 1992 after Scud missiles hit Israel during the 1991 Gulf War, reflects the IDF’s view that “the home front is no less a battlefront than any other location,” Eytan Buchman, an IDF spokesman, told JTA.

The National Emergency Authority, a division of the Home Front ministry, will run a national disaster simulation drill on Oct. 21 that will cover interruptions in communication and mobilization of forces that also would activate during wartime.

American Jewish communities have supported the National Emergency Authority’s efforts through the Jewish Federations of North America. Since 2006, U.S. Jewish federations have raised $350 million for the North, much of which has gone to renovating bomb shelters — for air conditioning, light fixtures, water coolers, toilets and television sets in the underground spaces. The funding also has provided for social, economic and educational programs according to Lee Perlman, JFNA’s managing director of program and planning for Israel and overseas.

The Gulf War also brought widespread distribution of gas masks to Israel amid fears that Iraqi strongman Saddam Hussein would launch biological or chemical attacks against Israel. This summer, gas mask distribution accelerated again as Syria’s government indicated it would consider using its stockpile of chemical and biological weapons in the event of a foreign attack.

Some Israeli politicians still worry that the country is unprepared for war, and they’ve been critical of Prime Minister Benjamin Netanyahu for seeming to move the country closer to an attack while Israeli cities are left exposed. Bomb shelters in northern Israel can hold only 60 percent of the local population, and almost half of Israelis do not own gas masks.

“Israel has failed to learn from the Second Lebanon War,” said Ze’ev Bielski, chairman of the Knesset’s Subcommittee for the Examination of Home Front Readiness, according to the Times of Israel. “The bomb shelter situation is still dire for millions of Israelis.”

But according to Meir Elran, director of the Homeland Security Program at Israel’s Institute for National Security Studies, the statistics are not cause for grave concern. He said that while the number of bomb shelters is not ideal, the situation is manageable because people will be safe as long as they remain inside a building. Building bomb shelters for every citizen would cost too much money and take too much time, he said.

“It doesn’t make sense that there would be a bomb shelter for everyone,” he said. “It’s a question of cost and benefit. No one on the world has this, and it doesn’t make sense for here.”

Elran added that providing gas masks to the entire population also is cost inefficient, especially given that “the other side understands very well that if it uses chemical weapons, our reaction will be very severe.”

Sometimes, Elran suggested, the best defense is a good offense.

“The shorter the war is and the more severely the other side will be hurt,” he said, “the better it will be for Israel.”