During the Renaissance the Czech capital drew astrologers, alchemists and magicians. Today's visitor can still sense the special aura that made it the scientific and cultural centre of Europe. Author and philosopher Peter Marshall reveals how the city inspired his latest book, 'The Theatre of The World'

Prague gets under your skin. It is a city of ambiguity, mystery, magic and memories. It is a city of locked towers, labyrinthine cellars, cobbled squares and poorly lit alleys. It has the largest ancient castle in the world. Along its streets, you can find the White Lion, Three Ostriches, Two Wolves, White Pony, Three Fiddles, Golden Ship, Two Suns, Iron Door and the Black Madonna (all names of old houses).

It is the city of Franz Kafka's Castle, which K can never enter; of trials in which the accused do not know what they have done; of Czech Brethren sharing their goods and refusing to fight; of wagon-loads of war booty churning in the mud; of Nazis jack-booting into the Old Town Square and emptying the Jewish Quarter; of Soviet tanks running down students in Wenceslas Square; of the Velvet Revolution, which left no dead.

On the astronomical clock of the Old Town Hall, the skeleton of Death appears on the hour. In Prague, the Tarot Hangman hangs upside down. In the short spring, almond blossoms burst out on the banks of the wide river Vltava; in winter, ravens on the black statues of Charles Bridge shake the snow from their wings. In the Gothic vaults of St Vitus cathedral the bones of emperors crumble. On a door of the Old Royal Palace, a brass knocker shaped like a young girl performs fellatio every time it is used. Prague is a city of the unicorn, of the bezoar, of the ouroboros, of the philosopher's stone, of the Golem, and the robot.

Prague gets under your skin. It is a city where the imagination soars beyond the steeples, where the unconscious erupts through the paving stones, and where you need to leave your reason in the antechamber of your dreams. Nowhere else does the visible so easily pass into the invisible, appearance into reality. The coat-tails of an alchemist, astrologer or magician suddenly disappear around a corner. Mephistopheles rolls out of a darkened doorway. Once I saw the Devil in a bouncer's suit in an Art Nouveau hotel which has three golden graces on its summit and a restaurant modelled on the Titanic's. I saw him again getting out of a black limo, the sun bouncing off his dark glasses, at the entrance to Prague Castle. Yet angels settle on buildings everywhere and can be found in the darkest alley and dankest cellar.

For the groups of revellers rolling around the Old Town, Prague is pilsner in vaulted taverns (the best in the world). For absinthe connoisseurs, it is sipping the lethal elixir in the café Slav opposite the National Theatre, glancing at the symbolist painting, (recovered by former habitué, velvet revolutionary, playwright and president Vaclav Havel) of an elderly gent in an empty café having a green vision of a naked young woman on a table. For lovers of Kafka and his disturbing vision, it is the bookshop in the main square with his father's sign of the raven and his tiny house in Golden Lane in the Castle that so haunted his imagination. Literary buffs will also enjoy the crazy atmosphere of the city which inspired the antics of Jaroslav Hasek's The Good Soldier Schweik, the mystical poetry of Rainer Maria Rilke, and the laughable loves and lightness of being of Milan Kundera.

For the diaspora, the old Jewish Quarter and its fine synagogues, which contributed to the golden age of Ashkenazi culture, is a place of pilgrimage. In the tree-erupting cemetery, prayers and candles are still left on the tomb of Rabbi Loew, a kabbalist for ever associated with the Golem which was made from Vtlava mud and was liable to run amok. For music lovers, it is the theatre of the world premiere of Mozart's Magic Flute (what place could be more appropriate?) and the home of the composers Smetana and Dvorak. Lovers of art come to enjoy what is left of the great Renaissance collections amassed by the Habsburgs as well as the Art Nouveau frivolity of Alfons Mucha. Architectural sleuths will delight in the Roman-esque, Gothic, Renaissance and Baroque palaces and churches as well as the Art Nouveau buildings and Art Deco features which have not yet been bombed or blighted by low greed and high-rise arrogance.

To the stroller and day-dreamer, Prague is the ideal city, on a human scale and full of hidden delights. Its atmosphere is constantly changing, whatever the day or season, with foggy dawns, murky twilights, dark snowy winters, exploding springs and long hot summers. One can still stroll with ease from the Old Town Square with its fairy-tale Church of our Lady Before Tyn through the labyrinth of narrow alleys to Charles Bridge and then up through the Lesser Quarter with its magnificent Renaissance mansions to the great castle and its cathedral on the broad back of Hradcany hill.

Prague in the 16th century was the European centre of both alchemy and astrology. This was largely due to the moon-struck Rudolf II, who by the age of 24 had been crowned king of Bohemia, Austria, Germany and Hungary and elected Holy Roman Emperor. Soon after, this Dominus Mundi moved his capital and court from Vienna to Prague. Here he created a magical theatre of the world into which he invited some of the most creative, subversive and original minds of his day.

Among the hundreds of astrologers, alchemists, philosophers and artists who flocked to Prague to enjoy its reputation for religious toleration and free enquiry came the English magus Dr John Dee, astrologer and spy for Queen Elizabeth; his dubious assistant, Edward Kelley, with whom he practised angel magic and swapped wives; the Polish alchemist Michael Sendigovius, who probably discovered oxygen; the Italian philosopher Giordano Bruno, who was executed in 1600 by the Inquisition for trying to restore the Egyptian religion; the Danish aristocrat astronomer Tycho Brahe, who lost his nose in a duel but was the greatest naked-eye observer of the heavens of his day; his poor assistant, the German mathematician Johannes Kepler, who established the three laws of planetary motion; and the Italian artist Giuseppe Arcimboldo, who anticipated Surrealism with his portraits made from fruits and flowers. Together, they helped to lay the foundations of both the Scientific Revolution and the Rosicrucian Enlightenment which opposed it.

As inheritor of one half of the Habsburg dominions - his uncle Philip II of Spain had the other - Rudolf was one of the most powerful and richest men in Europe. As the Holy Roman Emperor, he was expected to stop the Protestant rot at the heart of Christendom and to keep the Islamic Turks of the Ottoman Empire at bay. Yet entranced, like Hamlet, with the new learning, he found it virtually impossible to make a decision, whether in the affairs of the heart or of the State. Like Faust (who supposedly once lived in Prague), he was prepared to sacrifice all in the pursuit of magical knowledge and the elusive philosopher's stone. He was even accused by the Vatican of dabbling in sorcery and supping with the Devil.

Rudolf transformed his draughty, medieval castle into a resplendent Renaissance palace. His royal gardens beyond the Deer Moat grew oranges, figs, morello cherries, lilacs and tulips (the first in Europe), and in his menageries were lions, bears, wolves, Indian crows (parrots) and a dodo. He became Europe's greatest patron and collector of art and stuffed his kunstkammer with ancient sculptures, Renaissance paintings, scientific instruments, rare documents and curious objects. Whatever was miraculous or magical, he wanted to possess. Hoping to catch a glimpse of the essence of nature through the bizarre, he gathered in two nails from Noah's Ark, the feathers of a phoenix, the jaw bone of a Greek siren, a Seychelles nut formed like a woman's buttocks, a desiccated dragon, the horn of a unicorn and demons imprisoned in glass. He turned the Powder tower in his castle into an alchemical laboratory and used the balconies of his summer house to observe the heavens.

As a philosopher-aesthete, Rudolf was more interested in the great talents of his times than in exercising his immense power. By neglecting the affairs of state and failing to check the intrigues of the Vatican, he eventually lost his empire to his ambitious brother, Matthias. He died a broken and lonely man, refusing to take the last sacraments. Yet his life was a heroic failure, for he had turned Prague into the scientific and cultural centre of Europe and presided over a golden age of peace and creativity before the Thirty Years War.

Rudolf II and Renaissance Prague offered a perfect subject for my latest book, The Theatre of the World: Alchemy, Astrology and Magic in Renaissance Prague. It has a tragic hero as a central character, a dramatic story of high hopes, loss and betrayal, a galaxy of outstanding intellects, a magical city at its zenith and a pivotal moment in Western history. It marked the cusp between the medieval and modern when the magical world view that held sway at Rudolf's court, based on Neoplatonism, the Hermetic Tradition and the Kabbalah, began to be undermined by the mechanical and rationalist system of Newton and Descartes, which has dominated Western thinking ever since. Moreover, the story of the life of Rudolf, a doomed dreamer, is a tale worthy of Shakespeare and is as riveting as any thriller. In an age of prejudice and conflict, Rudolf stands out as an advocate of religious toleration and free enquiry. He realised that the pursuit of truth, wherever it might lead, is more important than the search for pleasure, power and riches.

Almost miraculously, the magic theatre of Prague has survived the wars and revolutions that have swept across the region since Rudolf's death. Once the centre of the Holy Roman Empire, it was reduced to an eccentric outpost of the Austro-Hungarian Empire. In the 20th century, it shook off Nazi and Soviet occupiers and negotiated a peaceful divorce with Slovakia. Prague is now the capital of a small European country, yet constantly able to transform itself and, partly thanks to Rudolf, it has become one of the great cities of the world. Just like Paris after the Second World War, it attracts artists, writers, musicians, flâneurs and rebellious youths. Hermes and Athena can still be seen strolling hand in hand, astrologers continue to contemplate the stars and alchemists work away in unseen laboratories of the imagination. The magic has lost none of its potency. Anything can happen - and does. Prague gets under your skin.

My favourite villa

The Star Villa (Letohrádek Hvezda) is a hidden gem in a wooded hill on the north-west outskirts of Prague. Built in 1555 by Archduke Ferdinand of Tyrol in the shape of a six-pointed star (Solomon's seal), it is one of the most energetic and mysterious buildings in central Europe. Its vaulted cellar is particularly powerful and the acoustics under the roof are extraordinary. Its levels probably correspond to the four stages of alchemy: black, white, yellow and red. The surrealist André Breton admired its sacred geometry and said it was "construit en pierre philosophale" (made from the philosopher's stone).

My perfect palace

The Summer Palace, now known as the Belvedere, was made by Rudolf II's grandfather, Ferdinand I, for his wife, Anne. It was the first authentic Renaissance building north of the Alps and remains one of its finest. Set in the royal gardens of the castle and looking like an upturned boat with a copper bottom, it is remarkable for the purity and simplicity of its design, the work of the Genoese architect Paolo dell Stella.


HOW TO GET THERE: Return fares to Prague from London Heathrow or Stansted on CSA Czech Airlines (0870 444 3747; czechairlines.co.uk) start at around £130.

FURTHER INFORMATION: Czech Tourist Authority (0906 364 0641, calls cost 60p per minute: czechtourism.com).

'The Theatre of the World, Alchemy, Astrology and Magic in Renaissance Prague', by Peter Marshall, is published by Harvill Secker, price £17.99.