Moroccan rescue crews found a five-year-old boy dead at the bottom of a well late Saturday in a tragic end to a painstaking five-day operation that has gripped the nation.

"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," a royal court statement said.

When an ambulance reversed into the deep cut that rescue teams had excavated to reach the stricken child and took away a body, the child's condition had not immediately been clear.

The boy's ordeal since he fell down the 32 metre (100 foot) shaft on Tuesday afternoon had gripped residents of the North African kingdom and beyond, also sparking sympathy in neighbouring Algeria, a regional rival.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.