Rome: You may well have a sense of déjà-vu when you enter Matera, a place that seems at once both truly xotic, oddly familiar and a little eerie.

Spread over a valley in Basilicata, the town is stark, called “la città sotterranea” (“the underground city”) for the vast number of hillside cave dwellings from the Paleolithic period in which, off on and on people are believed to have lived for more than 3,000 years. Of the city’s history and character, Carlo Levi wrote of its “touching and expressive painful beauty.”

There are two main caves systems, Sasso Barisano and Sasso Caveoso, giving Matera the look of an extraterrestrial landscape of secrets, all played out among the jagged rocks. In 1993 the town was granted UNESCO World Heritage Site status as “the most outstanding, intact example of a troglodyte settlement in the Mediterranean region.”

The reason Matera may look familiar, however, is that it has been the location for so many movies that required something stark, mysterious and primal, ideal for biblical stories like Piero Pasolini’s great 1964 film The Gospel According to St. Matthew and Bruce Beresford’s King David (1985); Mel Gibson set the crucifixion scenes here for his gory The Passion of the Christ (2004), and Patti Jenkins used the town for the

idyllic childhood home of Diana in Wonder Woman (2017); just this year, part of the next James Bond movie was filmed in Matera.

More than 15,000 people lived in those caves up until the 1950s, when the authorities declared them dangerous, condemning them as illegal dwellings. But although poverty persisted in Matera, after the government realized potential for tourism there, rehab money was invested and many of the caves began to be converted into stores, trattorias, even small lodgings. Today Matera’s population tops 60,000 people.

Given its ancient history, the Catholic religion is entwined with mythologies and legends, and the town has its share of churches from various periods, including the Cathedral, dating to the 13th century in the minimalist Romanesque style, with later Baroque interiors added. Small chapels are still to be found in the networks of caves underground, where they also dug out water cisterns, one of which, under the Piazza Vittorio Veneto, is navigable in a small boat.

However unlikely it sounds, there is a Museum of Contemporary Sculpture in Matera, located near the Piazza Duomo at the restored Palazzo Pomarici, with many of the works exhibited in cave-like settings.

Above ground, the 17th century Castello Tramontano (the “castle among the mountains”) is of some historic interest, but otherwise a visit to Matera centers on the winding uphill and downhill streets, drawn by the aromas of bakeries, whose semolina loaves often have three slits representing the Holy Trinity.

There is a consortium of Matera bakers, but one of the best-known bakery in town is Il Formo di Gennaro on the Via Nazionale. Luganica is the best-know sausage of Basilicata, named after an ancient people here called the Lucani by the Romans. Aglianico is the red wine of choice here. And do visit I Vizi degli Angeli, a “laboratorio di gelato” on Via Ridola.