Displaced Palestinians pass time in the courtyard of a U.N. school at Jabaliya refugee camp in the northern Gaza Strip. (Lefteris Pitarakis/AP)

Among the most controversial moments during the month-long conflict in the Gaza Strip were the shellings of U.N. schools used as makeshift shelters, housing hundreds of thousands of Gazans who had been displaced by the war.

The agency that set up the shelters, the United Nations Relief and Works Agency, was established after the 1948 Arab-Israeli war to provide relief and aid to Palestinian refugees, and it runs schools, clinics and other facilities throughout Gaza. During the recent hostilities, it turned its school buildings, which were closed for the summer, into shelters for Palestinians who had to evacuate their neighborhoods or lost their homes.

The number of displaced civilians needing shelter has decreased since the cease-fire started Tuesday. But UNRWA's Washington liaison officer, Chris McGrath, said he anticipates that many civilians will return to the shelters after they find their homes have been damaged or destroyed. There aren't many other immediate, short-term options for housing in Gaza other than these U.N. compounds.

As the beginning of the school year in Gaza approaches, here's a look back at what actually happened at these shelters and the international outrage those incidents caused.

What was the UNRWA's role during the conflict? 

The Israeli army designated a three-kilometer buffer zone that it said could be the target of massive airstrikes or bombings. Israeli forces also contacted Gazans before they hit a home, in an attempt to decrease  civilian casualties. Gazans who  lost their homes in airstrikes or bombardment or those who were asked to leave their neighborhoods often had no place to go. That's when the UNRWA opened its schools for shelters.

At its height, the UNRWA was housing almost 270,000 Gazans in these shelters.

The U.N. has 156 schools in Gaza, but only 90 were used as shelters because some were in the buffer zone, and others were in areas of intense fighting. The conditions at these buildings were less than ideal, according to reports — one school could only hold 1,100 people, but due to the heightened need for shelter, the school held four times its maximum capacity. This caused hygienic problems that sometimes resulted in health concerns. According to a UNRWA emergency report, small children were particularly vulnerable, and some suffered "from gastroenteritis, including vomiting, diarrhea and fever."

The attacks: Who is to blame?

On six occasions since the start of the conflict, UNRWA schools housing the displaced were subject to attacks. Three of these resulted  in casualties. Whether Hamas or Israel was responsible for the first attack is unclear. The other two were attributed to Israeli forces.

July 24: 16 Palestinians were killed and more than 100 injured in an attack on a school in Gaza City. Both sides blamed each other and there is no clear culprit.

 July 30: At least 19 people were killed when Israeli shells struck a school in Jabaliya. White House Press Secretary Josh Earnest called the event "totally unacceptable and totally indefensible."

Aug. 3: The latest attack resulted in 10 deaths. Israeli forces were reportedly targeting a member of Hamas but launched airstrikes next to a school.

International outrage

The attacks on the UNRWA schools were among the most shocking — and most widely condemned — incidents of the month-long war. The State Department issued its harshest criticism of Israel during the hostilities, stating  that it was “appalled” by the “disgraceful” attack on Aug. 3. France also denounced Israel, citing the "killing of children and slaughter of civilians."

Others chimed in as well:

Criticism of UNRWA 

Hamas rockets were found at three different UNRWA schools. Israel has often accused the organization of having a strong bias in favor of Gaza, but the organization notes that its staff discovered the weapons and made the findings public. "We immediately condemned those responsible for these flagrant violations of the inviolability of U.N. premises under international law," McGrath said. "At all times, and especially during escalations of violence, the sanctity and integrity of U.N. installations must be respected.”

What next?

Aug. 24 is the tentative start date for the new school year in Gaza. It remains unclear, if the cease-fire holds, what will happen to the displaced civilians residing in these schools.