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 finally 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.
The king had expressed his deepest condolences and sincere compassion, it added.
Rayan’s father was repairing the well at the time of the accident on Tuesday. He told local media the following day that his son had fallen down the shaft at “that one moment I took my eyes off him”, adding: “I haven’t slept a wink.”