Often seen as the living testimony of Venice's links with Byzantium, St Mark's basilica is also an expression of the city's independence. In the Middle Ages any self-respecting city state had to have a truly important holy relic. So when two Venetian merchants swiped the body of St Mark (though some historians believe they got Alexander the Great's remains by mistake, a theme developed by Steve Berry in his 2007 novel The Venetian Betrayal) from Alexandria in 828, concealed from prying Muslim eyes under a protective layer of pork, they were going for the very best - an Evangelist, and an entire body at that. Fortunately, there was a legend (or one was quickly cooked up) that the saint had once been caught in the lagoon in a storm, and so it was fitting that this should be his final resting place.

The Venetians were traders, but they never looked askance at a bit of straightforward looting as well. The basilica - like the city as a whole - is encrusted with trophies brought back from Venice's greatest spoliatory exploit, the Sack of Constantinople in 1204, during the free-for-all that went under the name of the Fourth Crusade.

The present basilica is the third on the site. It was built mainly between 1063 and 1094, although the work of decoration continued until the 16th century. The church only became Venice's cathedral in 1807, ten years after the fall of the Republic; until then the bishop exerted his authority from San Pietro in Castello.

Next door to the Palazzo Ducale, Venice's most important church was associated with political as much as spiritual power. Venetians who came to worship here were very aware that they were guests of the doge, not the pope.

ExteriorThe first view of the basilica from the western end of piazza San Marco is an unforgettable experience. It is particularly impressive in the evening, when the mosaics on the façade glow in the light of the setting sun (as they are mostly 17th- and 18th-century replacements, the distance improves them). The façade consists of two orders of five arches, with clusters of columns in the lower order; the upper arches are topped by fantastic Gothic tracery.

The only original mosaic (c1260) is the one over the northernmost door, The Translation of the Body of St Mark to the Basilica, which is the earliest known representation of the church. Of curiosity value is the 17th-century mosaic over the southernmost door, which shows the body of St Mark being filched from Alexandria and the Muslims reeling back in disgust from its pork wrapping.

The real treasures on show are the sculptures, particularly the group of three carved arches around the central portal, a Romaneque masterpiece. The inner curve of the outer arch is the liveliest, with its detailed portrayals of Venetian trades, arts, crafts and pastimes. The upper order, with fine 14th-century Gothic sculpture by the Dalle Masegne brothers and later Tuscan and Lombard sculptors, can be seen from the Loggia.

Visible through the doors, the narthex (covered porch) has an opus sectile marble floor; a small lozenge of porphyry by the central door is said to mark the spot where the Emperor Barbarossa paid homage to Pope Alexander III in 1177. The influence of Islamic art comes through in the few remaining grilles that cover the wall niches where early doges were buried. Above, a series of 13th-century mosaics in the Byzantine style shows Old Testament scenes.

The south façade, towards the Palazzo Ducale, was the first side seen by visitors arriving by sea and is thus richly encrusted with trophies proclaiming La Serenissima's might. There was a ceremonial entrance to the basilica here as well, but this was blocked by the construction of the Zen Chapel in the 16th century. At the corner by the Doge's Palace stand the Tetrarchs, a fourth-century porphyry group of four conspiratorial-looking kings. These come from Constantinople and are usually accepted as representing Diocletian and his Imperial colleagues. However, popular lore has it that they are four Saracens turned to stone after an attempt to burgle the Treasury.

The two free-standing pillars in front of the Baptistry door, with Syrian carvings from the fifth century, come from Acre, as does the stumpy porphyry column on the corner, known as the Pietra del Bando, where official decrees were read.

The north façade, facing piazzetta dei Leoncini, is also studded with loot, including the carving of 12 sheep on either side of a throne bearing a cross, a seventh-century Byzantine work. Note the beautiful 13th-century Moorish arches of the Porta dei Fiori, which enclose a Nativity scene.

InteriorA lifetime would hardly suffice to see everything contained in this cave of wonders. The lambent interior exudes splendour and mystery, even when bursting with tourists. The basilica is Greek cross in form, surmounted by five great 11th-century domes. The surfaces are totally covered by more than four square kilometres (1.5 square miles) of mosaics, the result of 600 years of labour. The finest pieces, dating from the 12th and 13th centuries, are the work of Venetian craftsmen influenced by Byzantine art but developing their own independent style. The chapels and Baptistry were decorated in the 14th and 15th centuries; a century later, replacements of earlier mosaics were made using cartoons by such artists as Titian and Tintoretto. However, most of these later mosaics are flawed by the attempt to achieve the three-dimensional effects of Renaissance painting.

In the apse, Christ Pantocrator is a 16th-century reproduction of a Byzantine original. Beneath, in what may be the oldest mosaics in the church, are four saint-protectors of Venice: Nicholas, Peter, Mark and Hermagoras. The central dome of the Ascension, with its splendidly poised angels and apostles, dates from the early 13th century. The Passion scenes on the west vault (12th century) are a striking blend of Romanesque and Byzantine styles. The Pentecost dome (near the entrance) was probably the first to be decorated; it shows the Descent of the Holy Spirit. Four magnificent angels hover in the pendentives.

In the right transept is the Miraculous Rediscovery of the Body of St Mark: this refers to an episode that occurred after the second basilica was destroyed by fire, when the secret of the whereabouts of the body was lost. The Evangelist obligingly opened up the pillar where his sarcophagus had been hidden (it's just opposite and is marked by an inlaid marble panel). Notice, too, the gorgeous 12th-century marble, porphyry and glass mosaics on the floor.

Baptistry & Zen ChapelThe Baptistry contains the Gothic tomb of Doge Andrea Dandolo and some interesting mosaics, including an image of Salome dancing. In the adjoining Zen Chapel is the bronze 16th-century tomb of Cardinal Zen (a common Venetian surname). The baptistry and chapel are very rarely open.

Chancel & Pala d'OroThe Chancel is separated from the body of the church by the iconostasis - a red marble rood screen by the Gothic sculptors Jacobello and Pier Paolo Dalle Masegne, with fine statues of the Madonna, the apostles and St George. Access to the Chancel is via the San Clemente chapel to the right, with a mosaic showing merchants Rustico di Torcello and Buono di Malamocco, apparently about to FedEx the body of St Mark to Venice. St Mark's sarcophagus is visible through the grate underneath the altar. It was moved here from the 11th-century crypt in 1835; the crypt remains a popular venue for society weddings, though it's closed to the rest of us.

The indigestibly opulent Pala d'Oro (Gold Altar-piece) is a Byzantine work and, for a change, was acquired honestly. It was made in Constantinople in 976 on the orders of Doge Pietro Orseolo I and further enriched in later years with amethysts, emeralds, pearls, rubies, sapphires and topaz, topped off with a Gothic frame and resetting in 1345. It's a worldly corner of the church, this. Set in the frame of the curving sacristy door are bronze busts of its maker, Sansovino, and his friends, Titian and Aretino, who helped to get him out of prison in 1545. Aretino was a poet and playwright who moved to Venice in 1527 after scandalising Rome with his Lewd Sonnets. A great satirist and hedonist, he is said to have died laughing at a filthy joke about his sister.

The left transept contains the chapel of the Madonna Nicopeia (the Victory Bringer), named after the tenth-century icon on the altar, another Fourth Crusade acquisition. The St Isidore chapel beyond, with its 14th-century mosaics of the life of the saint, is reserved for private prayer and confessions, as is the adjacent Mascoli chapel. The altarpiece in this chapel, featuring Saints Mark and John the Evangelist with the Virgin between them, is a striking piece of Gothic statuary. The chapel's mosaics, dating from 1430-50, have a definite Renaissance look to them. They are mostly by Michele Giambono, although some of the figures have been attributed to Jacopo Bellini and to the Florentine Andrea del Castagno, who was in Venice in 1432.

Loggia & Museo MarcianoOf all the pay-to-enter sections of the basilica, this is definitely the most worthwhile - and it's the only part of the church you can visit on Sunday morning. Up a narrow stairway from the narthex are the bronze horses that vie with the lion of St Mark as the city's symbol; here, too, is Paolo Veneziano's exquisite Pala Feriale, a painted panel that was used to cover the Pala d'Oro on weekdays. The Loggia also provides a marvellous view over the square.

The original bronze horses are now kept indoors. They were among the many treasures brought back from the Sack of Constantinople, where they had stood above the city's Hippodrome. For many years they were attributed to a Greek sculptor of the fourth century BC, but the idea that they may be a Roman work of the second century AD has recently come into favour: the half-moon shape of their eyes is said to have been a Roman characteristic. They were at first placed in front of the Arsenale, but around 1250 were moved to the terrace of the basilica.

In 1797 it was Napoleon's turn to play looter; the horses did not return to Venice from Paris until after his defeat at Waterloo. Apart from the parentheses of the two World Wars, when they were put away in safe storage, they remained on the terrace until 1974, when they were removed for restoration. Since 1982 they have been on display inside the basilica, with exact but soulless copies replacing them outside.

TreasuryThis contains a hoard of exquisite Byzantine gold and silver plunder - reliquaries, chalices, candelabras. If you can stand the glitter, the highlights are a silver perfume censer in the form of a church and two 11th-century icons of the Archangel Michael.