The boy fell into the 100-foot deep well on Tuesday.
CNN, citing two Moroccan state news agencies, reports the boy’s body was recovered by rescue teams on Saturday.
According to a statement from the Royal Palace, King Mohammed VI of Morocco called Rayan’s family to offer his condolences, per the outlet.
Prior to the recovery of Rayan’s body, his mother told a state-owned television station that her son had been playing nearby before disappearing. He was discovered to have fallen into the well, located near his northern Moroccan home, after she heard his cries. Authorities were quickly called to help and rescue efforts were soon underway.
Throughout the ordeal, rescuers were able to use a rope to send food and water down to Rayan, which his father told local media he saw him drink. “He was moving and drank a little bit of water. I believe he will be okay, God help him,” he said.
Additionally, Rayan was supplied with oxygen via a tube, according to Reuters.
Rescuers used machines to help dig a parallel path to the boy. Local outlet Le360 reported that two rescuers, who were just inches away from Rayan, had started manually digging, according to The New York Times on Friday.
The New York Times also reported that a rescuer told the outlet they had to continue to be cautious in their efforts due to the “chance of collapse” — which had been an ongoing concern.
Additionally, medical professionals and a helicopter were on standby at the well’s location.