Julen Rosello had been in the countryside with his family near the village of Totalan in Malaga on January 13 when he stumbled into the 110-metre well.
Specialist teams worked day and night in a tunnel that had been dug parallel to the borehole which is only 25 centimetre in diameter, the BBC reported.
Rescuers were unable to get to the boy via the well he fell down in because it was blocked by a layer of earth, sand and stones believed to have been dislodged when he fell into the shaft, reports say.
“At 1.25 a.m., the rescue teams reached the area of the well where they were looking for Julen and they found the lifeless body of the little one,” said Alfonso Rodriguez Gomez de Celis, the government representative in the region of Andalusia.
The accident happened during a Sunday afternoon excursion in a hilly plantation near Totalan. The well had apparently been left uncovered, although the businessman who had originally had it dug a month earlier insisted that he had sealed it.
Rescuers had earlier found hair among debris removed from the well and compared it with DNA samples from the boy’s drinking bottle as well as his family, confirming his identity, the report said.
This rescue mission was considered the most complex that had been undertaken in Spain, as dozens of machines, drills and excavators removed some 83,000 cubic metres of earth to dig a parallel well to reach the child, according to Efe news.
Rosello spent more than 12 days in the cold hole in the middle of the field while more than 300 people participated in the rescue tasks that involved drilling through the rock and soil that kept him trapped.
The density of the rocks forced the Civil Guards, specializing in caving and microblasting, to create explosions four times so as to open the way for the miners.
Outside the operation area in Totalan, parents, family members and hundreds of neighbours had been eagerly waiting for any news about the rescue operation watched by millions on TV channels throughout the country.
After the recovery of the body, reactions began pouring in from across the country including from the Royal House with King Philip VI offering condolences to Rosello’s family.
Spanish Prime Minister Pedro Sanchez also expressed grief and solidarity with the deceased’s family.