Medinaceli still has its Roman archway, but fewer than 700 people live in the ancient town on a ridge that overlooks the main Madrid-Barcelona highway below, teeming with vehicles speeding between Spain's biggest cities.
Between the capital and the busy coastal periphery, where most of the country's other major cities are located, lies what has become known as "empty Spain", where towns and villages are seeing their populations wither and, in many cases, disappear altogether.
But for one weekend each year in August Medinaceli becomes a stage for high art, due to one man's eccentric vision of bringing elite opera to the slumbering central town in Soria, the least populated of Spain's 50 provinces.
This year's production of Giuseppe Verdi's Aida will mark the climax of the sixth Medinaceli Lyrical Festival, an event that also includes a singing contest. It was created by retired architect Miguel Tugores.
"I know opera-lovers catch planes to London, New York or Paris to see a production, so I thought, let them come to Soria, to Medinaceli," he explains.
Mr Tugores closed an art gallery he ran in Madrid and started living full time in Medinaceli a decade ago after previously buying a house there as a weekend getaway.
"I accepted the challenge of opening the palace to the public, with the idea of using cultural tourism as a lever to recover one of these areas of what is known as empty Spain."
Like any visitor to the town, his eye was caught by the imposing Ducal Palace on the main square, a building that had lain empty for most of the 20th Century.
Medinaceli's mayor told Mr Tugores that if he wished to refurbish the building, it was his to use to house his art collection, which includes Picasso etchings and works by other 20th Century Spanish artists such as Lucio Muñoz and Manuel Hernández Mompó.
Since 2008, Mr Tugores' DeArte foundation has held 150 contemporary art exhibitions, 60 concerts and five full-scale operas in the palace courtyard ahead of the 10 August performance of Aida, with Andalusian soprano Lucía Tavira in the title role.
Pilar Burillo, a researcher whose work has proved influential in bringing the issue of Spain's empty spaces into the sphere of public debate, says Mr Tugores's opera festival and other such initiatives deserve support from the government.
"Authorities have to build infrastructure and basic networks, and then support private initiatives that promote employment, that bring in people such as cultural events and festivals," says Ms Burillo.
How Spain tries to fill its empty spaces
In half of Spain's 50 provinces, more than a third of the population is over 65 years old, and the situation in small towns is even more extreme.
Across inland Spain, local authorities and enterprising residents are searching for magic formulas to create employment and a renewed buzz around what are often half-derelict town and villages with their ageing populations:
- Segura de la Sierra, in olive country in Jaén in southern Spain, has held a classical and folk music festival since 2014.
- The north-eastern town of Borja hit the headlines in 2012 thanks to a local amateur artist's botched restoration of an Ecce Homo fresco. It started its own summer pop event after an English-language musical, Behold the Man, based on the famous art fail, was premiered in the Pyrenean town in 2016.
- The eastern province of Teruel launched a scheme to bring in immigrants - from countries as diverse as Argentina and Morocco - to tend local flocks and staff basic services, while mayors in several villages, such as Olmeda de la Cuesta in Guadalajara, have sold plots of land at giveaway prices.
'Lapland of the south'
Pilar Burillo's research identified a large area in Spain that became known as "the Lapland of the south" as its population density of just eight inhabitants per square kilometre matched that of the northern Scandinavian territory.
Soria is the only province whose entire territory is included in what Ms Burillo prefers to call the Celtiberrian Hills, stretching from parts of Segovia to the northwest of Madrid and as far east as the Mediterranean mountains of Castellón.
Ms Burillo's campaign has convinced the European Union of the need to recognise low-population areas that may not coincide exactly with entire provinces or regions, and where most inhabitants congregate in one city or urban corridors.
From 2021, 5% of EU structural funds are slated go to such "sparsely populated areas", but Ms Burillo also wants the Spanish government to introduce positive fiscal discrimination to create work in rural spaces.
"Can a country live with 99% of its population in urban centres and no-one looking after the rest of the territory?" she asks.
A 24-hour spectacle
For Mr Tugores, the festival represents a strain on his pocket and the fulfilment of a dream.
"To see how a lorry arrives at 8am bringing sets, technicians and electricians before the producer turns up at 10:00, then the costumes, and by now the set is quite ready; you come back from lunch and people are rehearsing," he says.
The final frantic hours before a production are filled with random requests but then the lights fall and the spectacle begins.
By 04:00 the next morning the set has been dismantled.
"In 24 hours I have seen the full cycle, how the spectacle lives and dies."
Year by year, the festival audience slowly grows, says Mr Tugores. One hundred people saw Don Pasquale in 2014 and he expects double that number this year.
Not everyone in Medinaceli is happy with the idea, but he is proud that some of the children of the town have become music students after attending the festival.
"It's worth it. It's an incredible experience. Even if someone offered me the thousands I lose on each opera, I would say 'no thanks'."