Moroccans have attended the funeral of Rayan, a five-year-old boy who spent five days trapped down a well, sparking a vast rescue operation that gripped the world but ended in tragedy.
The boy had fallen down a narrow, 32-metre dry well last Tuesday, sparking a complex earth-moving operation to try to reach him without triggering a landslide.
Well-wishers had flooded social media with messages of sympathy and prayers that he would be brought out alive, but their hopes were dashed.
On Saturday night, crowds had cheered as rescue workers cleared away the final handfuls of soil to reach him, after the marathon digging operation in the village of Ighrane in northern Morocco's impoverished Rif mountains.
King Mohammed VI called the parents to voice his condolences.
The child's body was taken to a military hospital in the capital Rabat, accompanied by his parents.
Today, it was transported to the Douar Zaouia cemetary near his village, where hundreds of mourners attended his funeral, AFP journalists said.
Rayan's father Khaled Aourram said he had been repairing the well when his son fell in, close to the family home.
The shaft, just 45 centimetres across, was too narrow for Rayan to be reached directly, and widening it was deemed too risky - so earth movers dug a wide slope into the hill.
Rescue crews, using bulldozers and front-end loaders, excavated the surrounding red earth down to the level where the boy was trapped, before drill teams carefully dug a horizontal tunnel to reach him from the side to avoid causing a landslide.
Vast crowds came to offer their support, singing and praying to encourage the rescuers who worked around the clock.