Britain has given £14.6 million to build twelve new schools for refugee children in Gaza, International Development Secretary Andrew Mitchell said.
The money will be used by the United Nations Relief and Works Agency (UNRWA) and is expected to benefit up to 24,000 children.
At present, 1,410 students are taught in shipping containers and 8,000 have to have many lessons in courtyards with almost all UNRWA-run schools twice over capacity, officials said.
Speaking on his first visit to the area, Mr Mitchell said: "Gaza is currently facing an education emergency, with over 40,000 refugee children unable to go to UNRWA schools.
"With more than 50% of Gaza's population aged under 18, improving access to education is essential. Today, I have seen for myself the vital work that UNRWA, supported by Britain, is doing to address the problems in Gaza.
"I have met children whose lives will be vastly improved by access to even the most basic education and the teachers whose dedication means their pupils have the chance of a brighter future"
While in the region, Mr Mitchell held talks with Palestinian Authority Prime Minister Salam Fayyad and Palestinian President Mahmoud Abbas as well as with Israeli Minister Benny Begin.