It was a Friday afternoon in June. The sky over Gaza was a broad wash of purple blue, and along the seafront the surf was breaking into small whitecaps. Ali Ghalia was on a day off from his work as a farmer and decided to take his family for lunch on the beach at Beit Lahiya, a few minutes' drive from their home. The beach on the Mediterranean, with its rolling dunes and dry grasses, is a rare delight in a stretch of land ground down by poverty, overcrowding, militancy and decades of military occupation. It is free to the public and barely touched by development - just a few half-built hotels are dotted along the 25-mile coastline, the shadow of a tourist industry that never was.

Ghalia had two wives, as is still sometimes the custom in the Palestinian territories, and both were with him on the beach that day, along with their dozen children and their beach kit: several plastic armchairs, plates of food and cooking pots, flasks of tea, plastic toys, blankets to sit on and a small cot for the baby. They ate lunch and lazed in the sunshine, and were still on the beach shortly after 4.30pm.

Although it was a Friday afternoon, others in Gaza were still at work, among them Zakariah Abu Harbeed, 37, a cameraman with Ramattan, the leading Palestinian news agency. He is based at the agency's 10th-floor offices in Gaza City, ready to report breaking stories. Often in Gaza that means covering the conflict - dozens of times he has filmed the dead and the dying, and he has been shot at and wounded in the process.

That Friday, Abu Harbeed had been to Beit Hanoun, a town close to the northern border of the strip, to film the scene of an Israeli attack on a group of suspected militants. On his way back, he ran into another story. The Israeli military had just destroyed a car that they also suspected was carrying militants. He filmed that scene, too, and went to the hospital to get footage of the injured. It was, for him, an ordinary day's work. It was shortly after 4.30pm.

Then he took a call from a contact in the ambulance service: the Israeli military were shelling the beach at Beit Lahiya and there were casualties. He called his driver and they jumped into the car.

That afternoon at the beach, Abu Harbeed shot about 10 minutes of film for which he later won two awards. He arrived just in time to record the aftermath of a terrible explosion that had killed most of the Ghalia family. Seven were dead: Ali Ghalia, 49, and one of his wives, Ra'eesa, 35, together with five children: Haitham, five months old; Hanadi, 18 months; Sabreen, four; Ilham, 15; and Aliya, 17. Several others were injured, some severely, including more children from the family.

Much of the film Abu Harbeed made that day is so graphic it would never be broadcast on television in the west. One clip, however, was broadcast repeatedly that day and in the days that followed. It showed Huda Ghalia, aged 12, distraught and sobbing by the body of her dead father. It was an image distilling Palestinian despair, one that recalled the film of Mohammad al-Dura, the 12-year-old boy who died in his father's arms in Gaza in a hail of gunfire six years ago, at the start of the intifada.

Abu Harbeed talked me through the footage in a cramped video editing suite at the Ramattan offices. It begins as they drive up to the beach, the film shot from the passenger seat through a cracked windscreen with the blare of a siren in the background. There is one ambulance, its back door open, and half a dozen men shouting and panicked. Between them they uncover one limp body after another, dragging them out quickly and either placing them on a stretcher or running with them to the ambulance. They don't have time to notice that several of the bodies they are carrying are dead, the wounds horrific, impossible to survive. One of the men reaches for a girl, grabs her black clothes at the shoulder and places her on a green canvas stretcher. Her left arm has been blown off just above the elbow. She is pale, unconscious and looks dead, but in fact she survives. I learned later that her name is Amani. Somewhere among the bodies is her sister, Ayhaam. She, too, is badly injured but survives.

As this was going on, Abu Harbeed just stood still and filmed. He is a professional just doing his job, and methodical. "You can see I'm not getting close to the bodies," he said, "that's too much for the audience. I'm getting the wide picture. But then I felt there was someone alive nearby, as if there was some life coming out of this death. Suddenly Huda imposed herself on this massacre."

Huda is at the corner of the screen, watching the men remove the bodies. She stands still, her arms by her side. She is in a blue T-shirt, her black hair curled down to her shoulders. As the last body is removed, Huda turns around and starts to run, her hands reach forward, the fingers splayed. Abu Harbeed follows her with his camera. "I couldn't tell where she was going. I just followed her." Huda reaches a dune, stops running and clasps her arms across her chest. She begins to scream: "Oh father, oh father", and the screaming continues even as she throws herself into the sand. The camera pans back to show her lying next to the body of her father, Ali Ghalia, broad-shouldered with a grey moustache and lying on his back. His mouth and eyes are open, but he is dead, his pupils rolled up under his eyelids. Huda is still screaming.

By now Abu Harbeed was quietly crying in the editing suite. After a minute he looked up. "I don't like to see these pictures. They make me suffer," he said simply. "I wanted people to see that this is a family that did nothing to anyone. There are no weapons, no military uniforms, just a picnic."

Beit Lahiya is a poor neighbourhood in the far north of the Gaza Strip. Many of the householders used to work as labourers in Israel, but since a clampdown on permits for work that income has dried up. Most now make a living farming the fields that lie just to the north, between the town and the concrete wall and steel fence that marks the border with Israel. But Gaza's farming industry is also struggling, thanks to Israel's repeated closure of the major crossing points out of the strip. Those closures have so damaged farm exports that many no longer bother investing in the seeds to plant cash crops such as strawberries and cherry tomatoes in the first place. Israel says the closures are justified on grounds of security. In effect it means that poverty levels have risen (unemployment in Gaza is running at 40%, according to the UN) and many families, like the Ghalias, have run up credit at local grocery stores which they hope to pay off in the future.

The Ghalia family house is unexceptional: a two-storey breeze block structure that looks at least partly homemade. It has a red-tin door, and next to it a spindly cactus that rises up to the height of the first floor and bows under the weight of the family washing line. Outside, there is a constant noise of children playing and the occasional donkey-drawn cart that passes by: the first has a boy with a loud-hailer advertising his tray of freshly caught fish; a few minutes later another cart goes by with baskets of live chickens. The family live on the ground floor, in a couple of empty rooms furnished only with mattresses and blankets that are rolled up and stacked against the wall each morning. Huda shares a bare bedroom with her two younger sisters, Hadeel, eight, and Latifa, seven.

In the months after the explosion on the beach, I went to visit Huda and her family many times, to listen to the story of a household struck by a tragedy, a family that captured the headlines and then dropped from sight. I ate with them, went to school with them, drove with them to see relatives and visited their injured in hospital.

The first time I met the Ghalias, they were sitting on plastic chairs in the sunshine outside the front door of the house. Ayham, 20, the oldest son, receives visitors. He is quiet and surly, and like most of the men in the family he smokes, though not in front of his mother or uncles. Since his father's death, he has become responsible for taking a lead in family decisions. He also works as a part-time guard at a local UN office and has begun a two-year secretarial diploma at the Islamic University in Gaza City. The university is affiliated to Hamas, the Islamic militant movement elected into power a year ago, and the course is to be paid for by Hamas: one of a small number of official contributions made to the family since what they call simply "the incident".

After a while, Huda appeared. She was barefoot and dressed in a black cloak with a white veil on her head. A gold bracelet hung from her wrist. She was quiet and monosyllabic: still visibly affected by what had happened. Huda and her two younger sisters have started at a new school, a Hamas-run girls' school in Gaza City, their tuition another gift from Hamas. She said she preferred the new school. "I have new friends now," she said. "I don't see the old friends any more." She had just returned from a visit that she, her two sisters, her mother and her aunt made to the United Arab Emirates. "It was fine," she said. It was her first time out of Gaza.

Some weeks later, Huda produced a photo album of that trip. The visit the family described to me was part political and part medical. Huda's mother, Hamdiya, 41, who had been badly injured in the right hand, was treated in hospital, as were Latifa and Hadeel. The film of Huda on the beach turned her into such a symbolic figure that many Arab officials queued up to see her. One photograph shows Huda standing with her fingers in a V for victory salute, in front of a poster of Abbas and the late Yasser Arafat. Another shows her sitting on a sofa in a pink dress and wide-brimmed hat, talking to the deputy prime minister of the Emirates. But the pictures the children most enjoy show them incongruously dressed in red ski outfits and helmets, holding plastic sleds at a vast indoor ski centre in Dubai.

In Gaza, Huda had already met Ismail Haniyeh, the Hamas prime minister, and Mahmoud Abbas, the Palestinian president. Both spoke of adopting her, as did other dignitaries she met. They meant that loosely - not taking her into their families to bring up as their own, but offering her moral and financial support. They were public gestures, singling out a girl suffering a private grief.

On their return from the Emirates, Huda crossed back into Gaza through Israel with a special VIP pass. Her mother and the rest of the family had to cross from Egypt, through the Rafah crossing, which is frequently closed and always overcrowded. They had no special passes. With so much attention paid to the young girl, it is perhaps not surprising that the family began to feel a degree of frustration.

For one thing, their neighbours presumed that this political attention, international travel and talk of adoption would translate into great financial wealth for the Ghalias. Hamas stepped forward to pay for the children's education, and a Qatari charity paid for the rebuilding of a house for Amani, the eldest daughter, married with two children, who lost most of her left arm in the incident. President Abbas provided around £1,000 and there appears to be the promise of money from the Emirates to pay to rebuild the family house - although eight months on from the incident, no work has begun. But there has been no more than that. Only after some time did it become clear to the neighbourhood that the Ghalias were still living as precariously as everyone around them.

Secondly, there was the extraordinary attention Huda received. Although she featured prominently in the footage shot on the beach, she was only lightly injured. The family was upset by the iconic status she had been given and angry that the others, who suffered much more serious physical wounds, had been overlooked. Huda's younger brother, Adham, 10, suffered serious shrapnel wounds to his stomach and mouth, and was eventually transferred to the US for treatment. He is still living there, looked after by a series of expatriate Palestinian families who ensure he receives the medical care he needs and that he is attending school. He calls home several times a week. Huda's two elder sisters, Amani and Ayhaam, who were the most seriously injured, have been in and out of hospital, and still have months of serious operations ahead of them.

"Huda was seen on television, that's all," said Hassan Ghalia. "But it is not only Huda, believe me. She is the one who saw everything and was seen by the world, but other people lost so much and nobody saw them." Hassan, 33, is one of Huda's uncles, the thinner and younger brother of her dead father, Ali. Of the several uncles who live nearby and take care of the family, Hassan is perhaps the most mature. He, too, is a farmer, but can't afford to plant this year and has no other work. He is carefully spoken and always points out that though he blames the Israeli military for the explosion, he does not blame the Israeli people, with whom he hopes the Palestinians will one day find peace. He told me, "The Palestinians firing rockets at Israel are doing it out of ideology. The Israeli military who fire at us are doing it out of ideology. And we are just crushed in the middle."

In the months ahead, it was Hassan who volunteered to look after his niece, Ayhaam, accompanying her on the trips to hospital in Israel and taking care of her physiotherapy on her return. And after all, he said, this was not the first crisis to hit the family. A year and a half earlier, in January 2005, several of his nephews were involved in another, equally traumatic incident: seven children, all under the age of 18, were killed, and seven other people, including five more children, were severely injured when they were hit by Israeli tank shells. The children, most from the Ghaben family, were in farmland just north of Beit Lahiya, picking strawberries. Witnesses said militants had been firing mortars from the fields over the border into Israel that morning, but disappeared as the Israeli shelling began. The Israeli military said it targeted a group of masked men preparing to fire more mortars. Three of the children lost both their legs - including Issa Ghalia, now 15, who is a regular visitor to Huda's family. He was treated in Israel and later in Iran. He was fitted with a pair of prosthetic legs, but prefers not to use them and instead would swing through the gate, up the steps and on to a chair using his arms alone. "The legs are good, but sometimes I just get tired of them," he said one day as he sat listening to the family's news. It is attacks such as these that have discouraged farmers in northern Gaza from going anywhere near their fields by the border.

On a Saturday morning I went to Huda's new school, the Dar al-Arqam, which is large, clean and imposing. Three newly-painted buildings stand on three sides of a large concrete playground. It has been open since August 2003 and around 1,500 children, aged between five and 15, study here. Nearly all are girls, although there are temporarily a small number of boys, too, because their school was damaged in recent fighting. All the teachers are women. "It is our kingdom," the deputy head, Eman Nassar, 34, told me. She took a degree in biochemistry at an Egyptian university and spent six years as a kindergarten teacher in Gaza before coming to the school.

Around a third of the children are loosely termed "orphans", meaning one or both of their parents have either died during the conflict or are among the 10,000 Palestinians held in Israeli jails. Like Huda and her sisters, they do not pay school fees. In addition, any child in the fourth grade or above who scores more than 95% in their end of year exams is exempt from school fees, which range up to 320 Jordanian dinars (£240) a year.

The school is openly affiliated to Hamas - although the teachers are at pains to insist that does not make them signed-up members of the movement - and there is a strong religious element to the teaching. Qur'anic learning is a key part of the children's curriculum, as are Arabic, English, science, maths, geography and history, all taught from government textbooks. Almost all the girls wear a uniform of a black cloak and a white veil over their hair. At home I noticed Huda now almost always veiled her hair, though her hair was not veiled that day at the beach.

"We work for God, not for Hamas or Islamic Jihad or anyone else," said Nassar. "We work for God and we want our children to be the best." The children themselves are not all from Hamas-supporting families - the Ghalias, for example, are almost wholly divorced from politics and show no particular loyalty to any of Gaza's political factions.

Nassar said the goal of the school is to teach the children to think, not to prepare them for any set role as women or in politics. "Everyone has to learn. But how you use that knowledge, that's what's important," she said. The teachers are all well-educated and the school is in far better condition than government schools in the area. The school day is longer, and the class sizes smaller. Huda, with her government school background, found herself well behind other girls of her age. Her English was particularly poor and she was extremely reluctant to speak up in class. It didn't help that she was teased a lot by the other children, and even now in between classes she plays with her sisters more than her classmates. "The other children would run after her saying, 'Huda Ghalia, Huda Ghalia', and, 'Oh father, oh father', just like they'd seen on television," said her teacher, Nadia Shurafa, 25. "Her response was to be shy and not talk to anyone. She tried to forget about what happened, but no one lets her forget. She just wants to be normal."

The conflict in Gaza has such a huge impact on all the children's lives that the school does its own psychological work. There are several others like Huda who have seen members of their families killed in front of them. Sometimes it is a matter of stepping in to prevent fighting in the playground. "They fight very easily," said Nassar. "They form themselves into different militia groups and act out what they've seen. Or they play 'I'm a Jew, you're a Palestinian'. You have to keep your eyes on them and try to get them to talk about what they feel. And sometimes you just have to accept what they do."

One teacher, Asma'a Obaid, 24, runs one-on-one sessions for the most traumatised children, including Huda. She encourages them to talk through their experiences and to draw scenes from the incidents they have been through. Obaid flicked through some of the most recent paintings on her desk. They show pictures of dead children, helicopters firing missiles into buildings and key events in recent Gazan history, including the killing of the Hamas spiritual leader, Sheikh Ahmed Yassin. "Sometimes the children say they want to kill the person who killed their father, or brother, or whoever it was," Obaid said. "We tell them it's better to educate themselves."

She often asks the children to draw a happier picture than the violence all around them ,and she produced one painting drawn by Huda that showed a large, multicoloured house next to a row of trees, with flowers and seven people in the garden and a smiling sun in the sky. "A specialist psychologist visited the school and saw this and said this represents where Huda wants to be, this place of stability and sunshine," Obaid said.

Huda's days are spent at school, or playing with brothers, sisters and cousins at home or the house of one of two uncles, Hassan and Yahya, who both live across the street. Every few weeks she is driven down to the south, to a house in the sand dunes near Khan Yunis, to see the woman she knows as her grandmother, who for 20 years has acted as a spiritual healer.

I went with her once and watched as the old woman talked to Huda, reading to her from the Qur'an and feeding her a sweet-smelling juice made of amber and musk, a potion rumoured to have special remedial properties.

"This helps to push out the fear," said the 70-year-old woman, Um Khalid, the mother of Ali Ghalia's second wife, Ra'eesa, who was Huda's stepmother and who was also killed in the beach explosion. "Thanks to God and this liquid, everyone gets better. I have a connection with God, you see. I just make the treatment and it all comes out of her. She calms down and she has really improved over time. They will forget eventually."

One afternoon, Huda was standing on the roof terrace of her family house in Beit Lahiya, picking passion fruit off a vine with her mother and younger sisters. The terrace looks over the back garden, which is small but full of trees: figs, oranges, lemon, a date palm and a banana tree that needs cutting back. It was several months after the incident on the beach and Huda was slowly beginning to open up. She was still shy, but less withdrawn than when I first met her. We talked about the new school, which she seemed to prefer. She talked about perhaps being a lawyer in future - this is what Sheikh Hamdan, the deputy prime minister in the Emirates, had suggested: "Become a lawyer, defend your rights." She talked about the television - the footage of her still reappears occasionally on the Arabic news channels. "We don't have a television and I won't go to any house that does have a television," she said. Her teachers say she is too frightened to look at any photographs of herself. "I remember that day and what happened," Huda said. "I can't forget it and sometimes I dream of it. I am trying to forget, but I can't."

As is often the case in the Israeli-Palestinian conflict, the cause of the explosion that afternoon on the beach is much disputed. The Ghalia family and others hold the Israeli military responsible for the blast, saying an artillery shell hit the family. The Israeli military had fired thousands of shells into Gaza in the preceding weeks, aimed at preventing Palestinian rocket attacks on Israeli towns, and admitted firing a number of shells from the sea and the land on that Friday. But the Israel Defence Force denied responsibility at the time and, in a written response for this article, said the explosion that killed the Ghalias was "without a doubt, not caused by the IDF". This conclusion was based on "intelligence analysis, Palestinian claims, media coverage of the incident and IDF filmed footage that documented all IDF activity during that day". It admitted the Israeli military had fired six artillery shells: the IDF could account for where five of those shells landed, but not the first shell, which it said was fired at 4.30pm. "The possibility that this shell landed in the area of the incident is close to zero," it said. The IDF concluded, based on clips of video footage, that the blast happened some minutes later and not before 4.57pm. The IDF also said that two pieces of shrapnel taken from two of the people injured at the scene did not come from 155mm IDF artillery shells. In its written response, the IDF offered no other possible cause for the blast, though in the days after the incident it suggested there had been a coincidental separate explosion on the beach at that time in the afternoon, caused either by a buried old shell or a mine planted by Hamas.

Several human rights groups and press reports at the time raised points of difference with the IDF account. In particular, a detailed article by the Guardian's Chris McGreal on June 17 showed that the timings noted in hospital records, and by a doctor and an ambulance driver, indicated that the blast happened some minutes earlier than the IDF maintains - so challenging the IDF's central claim that its shelling had stopped by the time the Ghalias were killed. The article also cited a former Pentagon battlefield analyst working for Human Rights Watch who believed that the crater size, shrapnel, types of injuries and their location on the victims' bodies (particularly to the head and torso) pointed to a shell dropping from the sky, not explosives under the sand. Witnesses spoke of hearing other blasts at the time, consistent with a pattern of shells falling at the beach.

It happens quite frequently that severely ill or injured patients in Gaza who cannot get adequate treatment in the strip's hospitals are allowed to cross into Israel. And so it was with Huda's two elder sisters, Amani and Ayhaam: shortly after the incident, both were taken to hospitals in Israel. Amani, 23, whose left arm had to be amputated above the elbow, was taken to hospital in Be'er Sheva and travels back and forth from Gaza on a regular basis. Ayhaam, 17, suffered severe injuries to her shoulders, chest, throat and legs, and for many months was confined to a wheelchair. Of all those on the beach that day, she was perhaps the worst injured.

Six months after the incident, Ayhaam was back in hospital in Israel, sitting on a metal-framed chair in a third-floor room at the Assaf Harofeh Medical Centre, near Ramla. With her was her uncle Hassan, who spent every day and every night in the ward at his niece's bedside. It was his first time in Israel since 1993. He spoke little Hebrew, the doctors spoke little Arabic, but he could talk to the cleaners, most of whom were Arab Israelis. He found many of the Jewish families in the hospital welcoming. "It's more human than political," he said as we sat together in the ward. "Most people we've met are compassionate. Their reaction is: 'We suffer in the same way you suffer.'"

It was Ayhaam's third time at this hospital, and when she had arrived about two weeks earlier, the doctors had been deeply concerned and advised an urgent operation. The problem was with her windpipe, which had narrowed so much that she was having difficulty breathing. It wasn't clear to the doctors whether the narrowing was caused by a shrapnel injury, or was the result of a long intubation in another hospital, or whether a small opening in the windpipe had become infected. Whichever, Dr Ilan Bar, one of Israel's leading cardio-thoracic surgeons, concluded that he needed to cut away the narrowed section of the trachea and then reconnect the remaining ends.

In a small office off the wards, Bar opened his textbook to show me the procedure. "You pray to God that it doesn't disrupt," he said. "It is very rare and very risky."

For the first few hours after the operation, it appeared to have been successful. Then, when Bar was out at a Saturday night football match at his Tel Aviv local club, he was called back to the hospital: Ayhaam's condition had seriously deteriorated.

"That Saturday night the doctor told me there wasn't anything more they could do," Hassan said. "We were just waiting for her to die." But by the Sunday morning Ayhaam had recovered. "For now I can say the procedural technique was successful," said Bar. "Now I want to take care of all the other problems she has, like walking and movement, clearing her lungs, healing her bladder. Our procedure was life-saving; now let's deal with the other problems that can make her life whole."

On the Tuesday after her operation, Ayhaam was sitting up, alert, in her room. Her feet, sunk in a pair of pink slippers, had been gently taped to a simple pedal machine to begin the first stages of physiotherapy. Bar, on his morning rounds, seemed pleased with her condition. "Today for the first time I saw her smiling," he said. "Before, she used to just lie on the bed like a sack of potatoes."

I asked him about the politics of the case, but he was dismissive. It was not the first time he has treated Palestinian patients: seriously injured children are quite often sent to his hospital and he has once visited Gaza to meet doctors there.

Two weeks later, Hassan and Ayhaam travelled back to Gaza by ambulance. The driver stopped at a hospital in Be'er Sheva to pick up another Palestinian patient, an elderly women in the final stages of cancer who was heading back to Gaza to die at her family's side. But the woman was sicker than the doctors had thought and she died in the ambulance. The driver had no choice but to carry on his journey. They passed quickly through the Erez crossing into northern Gaza. At that point, Hassan noticed, the driver suddenly speeded up and took a corner too quickly. The ambulance lurched over and toppled on to its side, throwing Hassan, Ayhaam and the dead woman on top of each other across the vehicle. The pair were bruised but not badly hurt, and as he told the story later, Hassan shrugged as if this sort of bad fortune was something they had come to expect.

The last time I saw them, Ayhaam was sitting on the porch of Hassan's house, warming herself in the afternoon sun. Most of the rest of the family were around her, apart from Adham, who was still in the US. Huda, who had just finished her end-of-term exams, was there, along with her younger sisters and her mother, as well as Amani, back briefly from hospital in Israel and soon to be fitted with a prosthetic arm. Her husband and their two children were with her. The family were laughing among themselves, and it was the first time I had seen them like this. They were happy to have the two elder girls home, and celebrating the news that another of Huda's uncles, Yahya, 38, had finally got himself a job working as a gardener for the municipal authority. It was to pay him just 1,000 shekels a month, but this was the first time he'd had work for many months. Yahya, who is always quick to make light of their lives, joked that he was so important at work, he'd soon be able to supply bags of flour and food for the family. "Ask God not to fire him," said Hassan, feigning a look of despair. He talked about Ayhaam and her slow recovery, and finding suitable medical care for her in Gaza, which has now become his main responsibility.

As the family chatted, there was no mention of the day on the beach last summer. I asked Hassan what he felt now about that day. "Eight months have gone by and nothing has changed," he said. "I know life goes on, but the scars are still deep." Ayhaam was soon to start physiotherapy, and to demonstrate her recovery she took a dozen uncertain and uncomfortable steps across the courtyard, supported by Hassan. Huda walked alongside, holding Ayhaam by her fingertips.