A five-year-old Moroccan boy who was trapped in a well for four days has died, despite painstaking efforts to rescue him.
A royal statement announced his death soon after his removal from the well.
The bid to free the boy, named as Rayan, had gripped the country, with hundreds of people gathered at the well and thousands more following online.
The boy plunged 32m (104ft) through the well’s narrow opening. The rescue had been hampered by fears of a landslide.
Rescuers brought the boy out of the well on Saturday evening.
No word had been given at the time about his condition, and the apparent rescue was initially met with cheers from the crowds.
On social media, people using the hashtag #SaveRayan, which had been trending across the country and beyond, expressed their jubilation.
But this turned to heartbreak minutes later when the statement came announcing that Rayan had died.
Twitter users then began paying tribute and expressing sadness using the same hashtag.
“Following the tragic accident which cost the life of the child Rayan Oram, His Majesty King Mohammed VI called the parents of the boy who died after falling down the well,” the statement from the royal palace said.
Led by Morocco’s Civil Protection Directorate, rescue operations in the small northern town of Tamorot, around 100km (62 miles) from the city of Chefchaouen, began on Tuesday evening.
Footage on Thursday from a camera lowered into the well showed that the boy was alive and conscious, but there had been no update on his condition since then.
The mixture of rocky and sandy soils meant rescuers deemed opening the water well’s narrow shaft to be too dangerous.
Instead, bulldozers were used to cut a huge trench next to the well. Rescuers then started digging horizontally to reach the boy.