y 6am, the 20 small, low-ceilinged classrooms are packed with an average of 68 students, three to a desk. Many have walked for more than an hour to get here.
The latecomers are outside tidying up the school grounds, pulling up weeds and slicing unruly grass with aged scythes. It is still quite cool, but they all know it will get hotter, much hotter, very soon. Only at 7am, when assembly is called, do they leave off their chores.
All 1,350 students at Zwelibanzi High, in the heart of a Durban township, line up on the porches of the squat, tin roofed buildings around the quadrangle. One end is left clear, where laid out in simple white stone on a grassy bank is the school's motto: Live, Love, Learn.
"We have an assembly every day," says Themba Mthembu, an energetic teacher who has been at the school for more than 26 years, the past 10 as principal. "It is most important. Many of these children are from very deprived backgrounds. Coming together to sing and dance cheers them up for the rest of the day. It is a great motivator."
The school is in South Africa's second biggest township, Umlazi, in the country's largest and poorest province, KwaZulu-Natal. Here, about 10 per cent of households are headed by children orphaned by Aids.
While the local pastor urges abstinence from drink and drugs, the students glance shyly at the visitors gathered around Mr Mthembu. They recognise one: a small white man with white hair and a beard.
Alex Wallace, the headteacher of James Gillespie's High in Edinburgh, has visited the township school three times now, building a relationship that has had far-reaching consequences for both schools.
It began three years ago. While studying for the Scottish Qualification for Headship, Mr Wallace joined an 11-strong party to look at leadership in an emergent economy. Among the many schools they visited were two in Umlazi: Zwelibanzi High and Ogwini Technical High.
Mr Wallace was shocked by what he saw. But, despite overcrowded classrooms and oppressive heat, the students were dedicated and determined. Their work was flawlessly neat and in English, and any malcontents were quickly hushed.
Resources were virtually non-existent, but the teachers made up for that in enthusiasm and camaraderie. School finished at 4pm, but then the teachers took classes for adults who had failed their matriculation exam or students from other schools who wanted extra sessions.
All the Zwelibanzi High students wore the regulation uniform, with shorn hair for neatness and cleanliness. It was clear that Mr Mthembu demanded high standards from both his students and teachers.
The Scottish group agreed that they would forge links with schools in South Africa, and before he left, Mr Wallace committed James Gillespie's High to an active and long-lasting relationship with Zwelibanzi High. Since then, his students have raised between pound;7,000 and pound;10,000 a year for the township school, recently paying for the James Gillespie's library, named in honour of the partnership.
But the relationship is, importantly for both schools, reciprocal.
"I have spent the past three years building a model that I hope other schools in Scotland will adopt," Mr Wallace says.
"It satisfies many of the priorities we face in Scottish schools, while bringing a depth to the experiences of our students.
"It builds a sense of global citizenship, illustrates that all actions have consequences and that political actions can be personal, fits in with our enterprise culture and provides mutually beneficial learning experiences."
Mr Wallace cautions: "It is difficult finding the right school to link up with, but I feel it has been the right choice for us.
"I visited one rural school that was incredibly poor, but it didn't have the infrastructure such a link needs.
"It has to be a reciprocal arrangement, so that our students get something back. It is not about simply handing over a blank cheque."
The project has become Mr Wallace's passion, but his depute, Marie Chetty, leads the project and is equally dedicated. The other visitors witnessing the enthusiastic assembly included the chair and another member of the school board, the chair of the PTA and Edinburgh councillor Marilyne MacLaren. They embody the support Mr Wallace has for the school link.
This support has been crucial, allowing Mr Wallace to embed the link within the curriculum. In enterprise education, for which Mrs Chetty is responsible, the students, especially in the senior school, search out opportunities to raise money for Zwelibanzi High. This has included a ceilidh last November, which raised more than pound;2,000, and a cafe, run by a group of pupils headed by sixth year student Adam Cassells. By selling coffee and tea to teachers and visitors by day and community users of the school by night, the Saffron Cafe has so far managed to raise pound;1,000.
All school years contribute to the fund-raising, but the majority is raised and co-ordinated by a group of sixth years known as the South African Committee. At Easter, the committee will fly out to visit the school themselves.
"The students' visit is an important part of the link," says Mr Wallace.
"It is the culmination of all their hard work and gives them an opportunity to see the fruits of their labour.
"They get to meet with their South African counterparts, take part in peer learning situations and, as one student told me, get to see the face of poverty close up.
"It can be quite empowering to see what they have achieved and it can make the sixth year seem really worthwhile."
The relationship is about sharing ideas and motivating change in both schools. Mr Wallace would like to see his students adopt more of the South Africans' attitude to learning, while Mr Mthembu wants his pupils to see there are people in other countries determined to help.
"It is not a simple relationship that can be developed quickly, like a pen pal scheme or a fund-raising project," says Mr Wallace. "It takes time and effort.
"You also have to see beyond the simple act of giving and be aware about sustainability. We have organised for 200 computers to be shipped out and shared among schools in Umlazi, but we need to ensure that the township has an adequate distribution network and electrical supply."
Fund-raising is not restricted to James Gillespie's High. To help Zwelibanzi High help itself, Mr Wallace invited Frances Benton, the mother of a former pupil and a professional fund-raiser who has raised millions of pounds for Barnardos, to join the delegation last month. She talked to the Zwelibanzi High students, teachers and governors about how to raise money, suggesting schemes such as an alumni list to target successful former students to increase support for the school. She also showed them how to access trusts - in South Africa and internationally - that allocate money to schools.
Many Zwelibanzi High students achieve remarkable results, despite its location and their background. The school is among the top 100 in the country. The percentage of students who pass external exams taken in their final year is currently in the high 90s, but it has achieved a 100 per cent pass mark in the past. Many have received distinctions.
It also has an unusually wide curriculum, offering students classes in fine arts, home economics and music, unlike many other schools in the area.
The driving force behind such results is the determination of students to escape the poverty of the township. But university is beyond the financial reach of many. To help, Mr Wallace has been in discussions and secured two free places each year at CIDA University in Johannesburg for Zwelibanzi High graduates.
Meanwhile James Gillespie's High is helping to develop the curriculum further. One area missed is physical education. The school has land for a sports field but boulders and rocks are strewn across it, while down a small hill a rusty basketball hoop juts out of the rocky grassland, which hasn't been played on for years.
Mr Mthembu and Mr Wallace agreed money should be used to hire a coach.
Victor Bonginkosi now coaches the students every week, at a monthly cost of pound;200, supported in particular by the third and fourth years at James Gillespie's High.
There are also big plans for the sports field. Ian Watson, who has been teaching PE for at least 30 years, will go out in May on a month's secondment to oversee the refurbishment of the grounds, much of it paid for with nearly pound;10,000 he personally has raised .
"Ian, like others of us, has had his whole career invigorated by his involvement in South Africa," says Mr Wallace, "and he is determined to see a sports field, basketball court and changing room built for the school."
Each department at James Gillespie's High has someone charged with finding ways to embed the school's link within the curriculum. The science team is developing an energy project based on a comparison of the township with Edinburgh.
This year, Gracemount High in Edinburgh will link with Ogwini Technical High, the other Umlazi school Mr Wallace visited three years ago, and Sciennes Primary, a feeder to his school, will link with Hillview Primary, which has a mixed Zulu and Indian roll.
There are many other schools around Durban in need of such support (more than 30 high schools in Umlazi alone, serving a population of 1.25 million). One is the Charles Memorial school in the dusty, rural area of Entshongweni, where a former Zwelibanzi High student is the headteacher. It has 400 students aged three to 14, a quarter of whom have no shoes and more than half have been orphaned by Aids. There are no books and the curriculum is limited to literacy, numeracy and life skills.
"I would really love to employ an English language teacher so that these children have some chance of escaping the poverty in which they live now,"
says Freedom Sibisi, who has been the headteacher for four years.
"I would also like to start a school library. I have the space but I don't have the books."
Mr Sibisi does have the electrical supply that is lacking in areas of Umlazi and he hopes to benefit from the computers being sent in May from Allen and Overy, a London law firm. He is confident that he can set up an internet link, which would enable his students to be in contact with children in Scotland.
At Zwelibanzi High, there are plans to install video conference facilities so that the South African committee members at James Gillespie's High can talk to their Scottish Committee counterparts. The cost of installing and running fans for the classrooms is being investigated and there are many other ideas on the wish list. Some will never come to fruition, but Mr Wallace remains optimistic.
Meanwhile, the school link has had an unexpected knock-on effect. Project Trust, an organisation that arranges gap year placements in overseas charity projects, recently told Mr Wallace it had more students from James Gillespie's High taking part than from any other school.