Rescue workers on Sunday extracted the five-year-old Moroccan boy who has been trapped since falling into a well five days ago.
The medical team had been examining the boy inside the well after rescue teams reached his location.
Moroccan media reported that the regional hospital in Tetouan has been prepped for the transfer. An ambulance and a helicopter were on standby at the scene.
No health updates have been provided by authorities.
A large crowd gathered at the scene watching as officials held back the praying mass.
Boy fell down 32-meter well
The boy had fallen down a narrow 32 meter well in his village near Bab Berred, in the northern tourist province of Chefchaouen, on Tuesday evening, according to local media reports.
The well descends from its 45 centimeters (18 inches) diameter at the top, which means the rescuers cannot go down themselves to retrieve the child. To combat this, rescue teams started digging alongside the drop, followed by a horizontal push into the cavity where Rayan lay.
However, the delicate operation was constantly delayed by rocks and imperiled by the threat of landslides. The rescuers have been placing concrete and steel pipes into the horizontal tunnel as they dig to allow them to pull Rayan to safety.
PVC tubes were installed to protect against landslides.
The hilly region around Chefchaouen is bitterly cold in winter. Reports say that food has been lowered to Rayan, but it was not clear whether he has eaten any. He was also supplied with water and oxygen using a tube.
The incident has sparked a global call to #SaveRayan going viral across the region, with pictures that showed Rayan huddled at the bottom of the disused well.
A helicopter was standing by to ferry Rayan to hospital as soon as he is freed on Saturday.
With agencies
Moroccan rescuers extract five-year-old boy stuck in well for five days
4 years ago