The five-year-old boy spent four days trapped in the deep well while the rescue team worked tirelessly to save his life.
The Moroccan royal palace informed that the boy died before the rescue workers could reach him. Moroccan King Mohammed VI confirmed the tragic news.
The boy named Rayan fell 32 meters (105 ft) down a well where he got trapped. A tunnel was dug specifically for the rescue.
Footage recorded at the scene shows how the boy was carried out of the tunnel by emergency workers. They spent an hour inside before they emerged with Rayan held on a stretcher.
The boy's parents were led to an ambulance while waiting to see their son.