The body was found at Roda de Bera, a seaside town on Spain's Golden Coast between Tarragona and Barcelona, and was that of a child aged between two and three, the town hall said in a statement.

Town mayor Pere Virgili told radio station RAC1 that one theory the authorities were considering was that the child was a migrant who had drowned at sea in an attempt to reach Europe.

The area was sealed off on Tuesday morning and authorities appealed to local people and holidaymakers to avoid it until the judge had concluded an examination of the body and allowed it to be taken away.

Virgili said the body had been discovered by a municipal team cleaning the beach early in the morning. It was in an advanced stage of decomposition and wearing clothing "not typical of a child going to the beach".

A Guardia Civil source said one hypothesis was that the child was a migrant drowned at sea, while a second source said they would have to wait for the results of an autopsy to be certain of the child's origin and cause of death.

Migrants habitually arrive on Spain's eastern Mediterranean coast in sea crossings from Algeria.

According to Spanish migrant charity Walking Borders, the route has been the second most deadly in the Mediterranean for migrants over the past five years, with an estimated 464 people dying in 43 boat sinkings in 2022 alone.

(Reporting by Emma Pinedo, writing by Aislinn Laing, editing by Nick Macfie and Angus MacSwan)