One day three years ago, in the early hours, Israeli forces struck the Beit Lahia Primary School in Gaza with white phosphorous and artillery shells.
At least two bombs exploded, killing four pupils. The burning chemicals wrecked the playground. The blasts damaged the school building and scattered most of the nearly 2,000 refugees who had sought shelter in the United Nations-run school.
A year later, Beit Lahia was the first school to be adopted as part of a United Nations Relief and Works Agency for Palestinian Refugees (UNRWA) programme. In 2011, the UAE's Khalifa Foundation took over most of the school's major costs, including repairs.
"A lot of our activities," says Dr Mahmoud Hemdiat, UNRWA's education chief in Gaza, "are funded by our family in the Emirates."
The family is staying.
This spring, the Khalifa Foundation signed an extension to support the school, which has been renamed Khalifa bin Zayed School, for a second year. Under the Adopt A School programme, the humanitarian organisation pays teacher salaries and provides pupils with computers, uniforms, hygiene kits and stationery.
UNRWA authorities said the UAE's sponsorship was a model for the Adopt a School programme. The UN hopes the initiative will help support existing schools, since the Israeli blockade limits the construction of new schools.
"All of the Gaza Strip is suffering or living in complex or complicated circumstances, and our full respect and our full appreciation is to our brothers in the UAE," Dr Hemdiat says.
In 2010, the Palestinian Territories was the biggest recipient of UAE foreign aid, receiving Dh363million, according to the UAE Office for the Coordination of Foreign Aid's most recent report.
That works out to 13 per cent of the UAE's total foreign aid that year. The federal Government was the single largest donor, contributing Dh162 million. Of that, Dh158million was general budget support to the Palestinian Authority.
Ninety-five per cent of all aid to the territories went towards development projects. The majority of humanitarian relief came from the Red Crescent, which donated Dh8 million for health and shelter.
The Khalifa Foundation gave Dh8.3 million to the Palestinian Territories in 2010.
Khalifa bin Zayed School hosts two elementary schools, one for boys and one for mixed classes, and serves nearly 3,000 pupils.
"I can claim it is one of the best schools in the Gaza Strip," says Adnan Abu Hasna, a media adviser for the UNRWA. "We have seen a dramatic change in the past two years, and now thousands of students are requesting to go to our schools."
Before the Khalifa Foundation arrived, the school had been struggling to recover.
The school "really suffered from a lack of interest and attention", Mr Hasna says. "The level of teachers was very low, and we lacked support services for students."
The foundation's money enables the school to buy sporting equipment and to start football and volleyball teams. Classes in reading, writing and mathematics have been improved, and the number of classrooms has risen from 23 to 29.
"We try to educate them on citizenship, global citizenship, and Islamic identity," Dr Hemdiat says. "We encourage students to be creative and more active."
The school's headmaster, Riad Maleeha, says it ranked first in performance in its region this year.
"The school has had a very positive effect on the community, because we encourage our students to do well," Mr Maleeha says.
The Khalifa Foundation and UNRWA have been working together since 2008, when the foundation supported a project to feed to poor refugees in Gaza.
UNRWA operates more than 220 schools in Gaza.