The high priest of the Gothic novel fled to Portugal following an 18th-century sex scandal. Good move, says Matthew Hancock

I've heard of Beckham, but Beckford?

Get your head out of the sports pages. William Beckford (1759-1844) was a dilettante, fervent collector and author of the gothic novel Vathek, the tale of a Caliph who builds a tower of 11,000 steps so he can rise above mere mortals and use his wicked power to dominate mankind.

How did Beckford end up in Sintra?

Fabulously wealthy and highly intelligent, Beckford caused a furore when, aged 24, he was caught in an uncompromising position with a 16-year-old boy, Kitty Courtenay. He escaped the scandal by fleeing to the Continent, and hired a quinta (that's a Portuguese house) in Sintra's Montserrate Gardens from 1793–1799.

A suitably gothic hideaway?

There are horrors on the IC19 motorway from Lisbon to Sintra (Portugal has the highest rate of accidents in Europe, with a high proportion of them being along this stretch), but once clear of the high-rise monstrosities of the capital's suburbs, you find a magical hilltop town with barely a trace of modernity. A series of fabulous quintas and palacios dot the ravines and steep, densely wooded slopes, with Lisbon's sprawl miraculously invisible from its stunning vistas. It's beauty is such that it has been designated a Unesco World Heritage site.

The mountain tops are strewn with house-sized boulders, as if flung by furious giants, and a curious mist often descends over the lichen-covered trees and terracotta rooftops even when it is bright and sunny in Lisbon, half an hour's drive away.

Spooky. Any haunted castles?

A shell of a Moorish castle hangs high above the town. You can clamber along its walls for fantastic views over Lisbon, the Atlantic and the rolling hills of Estremadura to the north. Gothic is also the favoured style of its palaces, from the 14th-century Palacio Nacional – whose extraordinary cow-horn-like tapered chimneys dominate the skyline – to the eccentric Palacio da Pena, a Disneyesque structure commissioned in the 1840s by the German husband of Queen Maria II. Its mishmash of drawbridges, ramparts, towers and domes would have appealed to Beckford's romantic imagination.

Why so many palaces?

Sintra was long the favoured summer residence for Portuguese monarchs and has continued to attract the country's wealthiest individuals, most of whom seem to have been obsessive builders and collectors. The Museu de Arte Moderna – set in Sintra's jazzy former casino building – houses part of tobacco magnate Joe Barardo's stash of modern art, though his collection is so huge that the museum changes its displays each month to give different bits an airing. Depending on when you visit, you can admire works by Jackson Pollock, David Hockney and Gilbert and George.

On the other side of Sintra, the early 20th-century Quinta da Regaleira was the former home of an obscenely rich Brazilian merchant, Antunio Augusto Carvalho Monteiro. The neo-gothic palace was designed by Luigi Manini, a set designer who had worked at La Scala in Milan. The Italian's sense of the dramatic is obvious, especially in the rambling gardens which resemble some vast operatic backdrop. Paths overhung with tree-ferns climb past terraces lined with marble statues of Greek gods to a hidden rock door. Given a hefty shove, the door swivels open, Harry Potter-like, to reveal a 30-metre deep dry well.

A moss-strewn stone stairway spirals down to the foot of the well, where an underground tunnel leads you blinking, dazzled by the daylight, to the sparkling waters of a lake. No one knows exactly what the well was built for, though Freemasons' initiation rights seem to have played a part.

Sounds like the stairs in Vathek. What's Beckford's legacy here?

You can still visit Beckford's former property, Montserrate Gardens, by taking a winding, mimosa-fringed road two miles out of Sintra and wandering through iron gates into a living landscape painting. Beckford wanted to create the ultimate romantic garden: he partly landscaped the area, built a waterfall out of giant slabs of rock, and even imported a flock of sheep from his Fonthill estate in England. In the 19th century, another Englishman, Francis Cook, brought over the head gardener of Kew to further improve Montserrate, and today the gardens support more than 1,000 species of sub-tropical trees and plants which flourish in rambling ravines and across sweeping wooded slopes. For a time Montserrate boasted the only lawn in Iberia and it remains one of Europe's most richly-stocked gardens.

Anything else?

Lawrence Hotel in Sintra has a William Beckford room with a four-poster bed and dizzy views down the valley. Beckford talked of enjoying a meal at the hotel, which opened in 1764 and lays claims to being the oldest hotel in Iberia. It counts Lord Byron and Portuguese novelist José Eça de Queiros as former guests.

So Byron liked Sintra too?

Byron set his epic poem Childe Harolde's Pilgrimage partly in "Cintra's glorious Eden", and in a letter to his mother said that Sintra "contains beauties of every description, natural and artificial".

What can I eat in Sintra? Garlic, steak through the heart?

The local speciality is a queijada, an odd tasting sweetened cheesy cake. A kind of Upstairs Downstairs set-up exists on the main square; starched-collared waiters fuss over wealthy punters enjoying succulent fish and fine Portuguese wines on the terrace of the blue-tiled Café Paris. Tucked beneath the building lies the basement Adega das Caves, where locals down wickedly powerful bicas (espressos) or bottles of Super Bock beer.

How do I get there?

If you've nerves of steel it's a well sign-posted drive from Lisbon airport. Regular trains depart from Lisbon's central Rossio station, a 40-minute ride. Stagecoach buses also climb up to Sintra from the neighbouring resort of Cascais.

British Airways flies daily from Gatwick to Lisbon (0845-773 3377 from £87 if you book before 15 March (for travel before 15 May). TAP Air Portugal (0845-601 0932 also has daily flights to Lisbon from Heathrow and Gatwick. A night at the Lawrence Hotel, Rua Consiglieri Pedroso 38-40 (00351 21 910 5500, email costs €160 (£100) for two people until 27 March. A week in the four-star Hotel Tivoli with Noble Caledonia (020-7409 0376; email £775; price includes return air fares, transfers and excursions.

Further information from Sintra tourist office on 00351 219 231 157; and the Portuguese Tourist Board (22 Sackville Street, London W1X 1DE, 09063 640610;

Matthew Hancock is author of the 'Rough Guide to Lisbon'.