Looking at the massive plume of smoke rising above the Gaza skyline on Thursday, Israelis tasked with coordinating humanitarian aid shipments into the Strip couldn't believe their eyes. Thousands of sacks of wheat and other foodstuffs sent through the Israeli crossings over the past weeks, and stored at the food warehouse at UNRWA headquarters, were on fire. Much of the work Israel and UNRWA have been doing to avert a humanitarian crisis in Gaza was going up in flames, literally. The shelling of the United Nations Gaza headquarters building, that serves as a shelter for hundreds of people and stores food for the population, put the relationship between the IDF's newly-formed Joint Humanitarian Coordination Center (JHCC) and the UN to the ultimate test. According to UNRWA, at least three tank shells hit its main compound in Gaza City, and the structure was ablaze. The army said it was looking into the matter, but initial investigations showed IDF fire was directed at "terrorist fire emanating from the vicinity of the UNRWA building." In a case of "perfect" timing, UN Secretary-General Ban Ki-Moon is in the region to advance a cease-fire. He expressed "outrage" at the "intolerable" incident, and Defense Minister Ehud Barak told him that Israel had committed a "grave mistake." Perhaps oblivious to Barak's statement, Mark Regev, a spokesman for the prime minister - as well as an adviser on the foreign press and public affairs - said it was not clear whether the IDF was responsible for the attack, and that Hamas had a "consistent record of using UN installations as a cover for attacks against Israel." UNRWA claims that Israel's credibility has rapidly deteriorated with every contradictory assertion its spokespeople make. News of the incident broke as JHCC head Brig.-Gen Baruch Spiegel was meeting with international aid groups at the unit's Mahane Aviv HQ in Ramat Aviv. According to the IDF Spokesman's Office, Spiegel phoned the relevant forces on the ground and asked them to cease firing. According to Spiegel's office, UNRWA asked for and received sand to put out the fire at the UN building, claiming that water was not sufficient to extinguish it. UNRWA spokesman Chris Gunness said the building was hit by three white phosphorous shells, which cause extremely hot fires. Five fuel-laden trucks parked near the building were moved, so that their contents would not catch fire. For the second time in 20 days of fighting, UNRWA threatened to suspend its humanitarian activities in Gaza, because of the "targeting" of its staff and installations. THE IDF coordination center runs a joint database with UNRWA on the movement and location of displaced Palestinians. UNRWA informs the coordination center every time there is a change in the movement of civilians into and between shelters, and the IDF has the GPS coordinates of all UNRWA installations. The center then passes all that information on to the fighting units to make sure each commander knows the location of concentrations of civilians sheltered in UN buildings. In an effort to avoid collateral damage, areas with large concentrations of displaced civilians can be marked as "no-fire" zones, Spiegel said Wednesday, before Thursday's incident. The number of Gaza residents who have fled their homes remains unknown, but is estimated in the tens of thousands. As of the evening of January 12, UNRWA was operating 38 emergency shelters, with 35,520 displaced people. On January 6, 43 people were killed and 55 wounded, when shells fell outside an UNRWA school in Jabalya. According to the UN, up until Thursday's incident, two of its staff and four contractors had been killed while on duty in Gaza, and six staffers and four contractors wounded. Another two staffers have been killed while off duty. Some of them have been killed by mistake, Spiegel says. One of these incidents led UNRWA to suspend its operations for a day, until it received assurances of better coordination from the IDF. AS THE IDF ground offensive intensified this week to include street battles in densely populated areas, the need for a real-time mechanism of coordination between the IDF and international humanitarian organizations became imperative, especially in a climate of increasing consternation among aid groups about the situation in Gaza. To this end, the IDF, together with the Foreign Ministry, set up the Joint Humanitarian Coordination Center at the Mahane Aviv base, under Spiegel's command. There are two daily meetings at the center - one in the morning to assess that day's needs, and one in the evening to see how things went and what lessons can be learned. Present at these meetings are Spiegel and his staff, representatives of the major humanitarian groups working in Gaza, and staff from the Foreign and Health ministries, the IDF Spokesman's Office and other branches of the military. Spiegel's unit, assembled under emergency orders, answers directly to the General Staff, and is an integral part of the army's operational doctrine. The army considers its work as an extremely important mission - one that runs parallel to the central war effort. Beside the moral imperative to help the civilian population, the unstated aim of the humanitarian effort is to provide Israel with a wider "humanitarian window" within which to carry out its campaign against Hamas. The theory is that the longer the IDF can stave off a humanitarian crisis in Gaza, the less Israel will be pressured into a cease-fire. The coordination between the IDF and aid organizations on the ground in Gaza is being carried out by 25 humanitarian liaison officers who report directly to Spiegel. The officers, mostly reservist colonels and majors from the office of the Coordinator of Government Activities in the Territories, are attached to the forces inside the Strip, throughout the chain of command, up to the brigade level. The soldiers, all of whom speak Arabic and English and who, in civilian life, are doctors and lawyers, act as troubleshooters for and coordinators of the IDF's humanitarian efforts. They are armed and embedded with units in the field. They can usually be found close to brigade commanders, whom they advise on their humanitarian responsibilities, in real time, the way that intelligence and legal officers advise their commanders on other operational aspects. They speak Arabic to Gaza residents to ascertain their needs, and also communicate with Palestinian employees of international humanitarian organizations, who are looking after the population in Gaza during this difficult time. Spiegel has a list of the cellphone numbers of all 25 humanitarian officers tacked to the wall next to his desk. Both the land-lines in his office and his cellphone ring constantly, as he fields calls from his officers, international aid groups and even foreign diplomats who need to get their dual nationals out and their countries' humanitarian donations in. The deployment of the humanitarian officers to the combat brigades is a sign that their work is fully integrated into the army's day-to-day operations. "The humanitarian orders are not an annex to the order of the day," Spiegel says. "They are a part of the operational orders. They are built in. They are the responsibility of the commander, not the humanitarian officer. This is a mission the commander has to implement, the same way he has to occupy a hill." THE COORDINATION center has been extremely busy since its inception last week. As the fighting in Gaza raged this week, a doctor in Jabalya put in a frantic call to one of his contacts at an Israeli NGO. Despite the humanitarian cease-fire, he said, the building he and 30 members of his family were in was coming under fire. Would this person, he begged, please do something - anything - and quickly? The contact immediately phoned Spiegel's office in Ramat Aviv, and within minutes, he had set up a conference call with the Palestinian physician and the very officer who was shooting in the area of his building. Together they arranged for the shooting to stop, and for the doctor to walk out of his house waving a flag, while leading the others out. In another incident, UNRWA's chief of operations called up the center saying that there were 37 empty UNRWA trucks making their way to the Kerem Shalom crossing to load up on supplies, but their route was blocked by a tank positioned at the former settlement of Netzarim. The tank was not letting the convoy pass - perhaps because Hamas has tried before to infiltrate its vehicles among large humanitarian convoys. UNRWA's fear was that the holdup would mean that vital humanitarian supplies would not get through within the three-hour humanitarian cease-fire window. Spiegel immediately phoned the humanitarian officer closest to the brigade commander in charge of the tank. Within 10 minutes, the convoy was cleared. Still, there have been many failures and mishaps. Humanitarian aid workers have been killed; wounded Palestinians have been left to die under rubble; the Gazan health system has all but collapsed; many people don't have access to clean water; and sewage is flowing freely through many streets. TRYING TO balance the need for professionalism and discretion on the ground with the potential gain of showing the world its humanitarian face, the IDF has so far not exposed the work of the special officers to the media. The Jerusalem Post is the first to report on their current deployment. There have been instances of humanitarian officers intervening during the fighting in an attempt to avert a humanitarian problem, Spiegel says, adding that there is no tension between the "fighting army" and the "humanitarian army." Some of the jobs the humanitarian officers carry out include making sure the army does not fire on the scores of ambulances buzzing around the Strip unless it absolutely has to, according to operational intelligence. SINCE THE beginning of Operation Cast Lead, 1,028 truckloads (25,322 tons) of humanitarian aid have been delivered to Gaza; 449 dual nationals have been evacuated; 3000 units of blood were donated by Jordan; five ambulances were donated by Turkey; five ambulances were transferred from the West Bank, on behalf of the Palestinian Red Crescent Society; and 34 people, including two children, have been evacuated to Israel for medical treatment. There are other, less encouraging facts, as well - such as an instance in which supplies sent by Israel into the Strip were left in warehouses, because there was nobody on the other side to pick them up and distribute them. The IDF says it knows for certain of at least one case of Hamas gunmen looting wheat storehouses in Deir el-Balah. But Spiegel says this is a sign "they're under huge pressure." Summing up the work of the JHCC, Spiegel says, "It's all on-the-job training. We're learning as the war goes on."