On January 8 1297 Francois Grimaldi, an Italian buccaneer who robbed and pillaged his way along the rocky coast of what is now called the Riviera, disguised himself as a monk and snuck through the gates of the fortress of Monaco, perched on a dramatic rock, which dominated a pleasant rocky bay. He then opened the gates of the town for his pirate friends and they saw off the soldiers of the ruling family of Genoa who had previously been in control. Seven hundred years later, thanks to a couple of historical incidents, Monaco remains an independent sovereign state, the smallest in the world. It covers less than a square mile but is known throughout the world as the glamorous place where the wealthy and the famous like to live.

Monaco is actually three villages which have grown into one: Monaco the rock - where the Grimaldi Castle sits; Monte Carlo, a village on the top of the cliff opposite; and La Condamine, a tiny port between the two.

Long before His Serene Highness Prince Rainier III married Hollywood movie star Grace Kelly in 1956, Monte Carlo was world-renowned because of its casino - which was the most famous gambling establishment in the world. It was opened in 1863 and helped Monaco develop its glamorous reputation. The relaxed tax laws help to attract the billionaires but originally it was simply a place where the winters were mild and there were things to do in a beautiful setting.

Nowadays there are so many rich and famous people who want to be based there that the grand old Monaco villas have disappeared beneath apartment blocks although one can still get an idea of what it must have been like in the old days if you visit the other little bays between Monaco and Nice. Under the towering corniches, with the sea blue to the horizon, they are dotted with bougainvillea-covered mansions and villas. A wonderful world.

Monaco's glamorous image was helped enormously by the Noghes family, wealthy cigarette manufactures who were well-connected with the Grimaldis. In 1909 Alexandre Noghes became president of the Sport Automobile Velocipedique Monegasque - the local cycle and car club. He proposed the creation of a car rally which would start at points all over Europe and converge on the town. The first event was in January 1911 and 23 cars set out from 11 different locations and was won by Henri Rougier in a Turcat-Mery, the judging being done on a rather arbitrary nature, based on the elegance of the car, the state in which it was when it arrived and so on.

There were cries of scandal when the results were published but it was, despite everything, a glamorous event. It was not until much later that it would develop into a proper race. In 1925 the SAVM changed its name to become the Automobile Club de Monaco. Three years later Alexandre Noghes's son Anthony suggested that Monaco hold a Grand Prix. The club had enjoyed some success organizing the Mont Agel hillclimb and Noghes felt that the next step was a Grand Prix. The idea received enthusiastic backing from Prince Louis II and in April 1929 the first Monaco Grand Prix took place. It was won by a mysterious Anglo-Frenchman called "Williams" in a privately-entered Bugatti Type 35B, painted in British racing green. In 1933 Achille Varzi and Tazio Nuvolari fought out one of their greatest duels on the streets and in 1934 the meteoric racing career of Algerian Frenchman Guy Moll reached its zenith with an unexpected victory for the young Ferrari driver.

The Grand Prix stopped during the war years but on August 5 1945 - nine days before the Japanese surrender - the 36th American Infantry Division held a regularity trial in Monaco - using jeeps and GMC lorries.

The racing revived in 1948 but the event struggled in the early 1950s - it was a sportscar event in 1952. But in 1955 it was back on the international calendar with a dramatic race which saw Alberto Ascari crash into the harbor and victory go to Maurice Trintignant. Monaco is a track where the driver plays a more important role than the car and so the race has tended to be won by the best: Ayrton Senna won six times between 1987 and 1993, Graham Hill earned the name "Mr. Monaco" with five wins in the 1960s. Alain Prost has won four times while Stirling Moss and Jackie Stewart took three victories apiece. Michael Schumacher won his fifth Monaco GP in 2001.

From time to time Monaco throws up a surprise: in 1972 Jean-Pierre Beltoise was untouchable in the wet but he never again won a Grand Prix. A decade later Riccardo Patrese scored his first Grand Prix victory in a race that no-one seemed able to win: Prost crashed, Patrese spun, Didier Pironi and Andrea de Cesaris ran out of fuel and Derek Daly leaked oil. Patrese, however, recovered from his mistake and crossed the line, thinking he had lost the race but discovered that he was actually the winner.

In 1996 Olivier Panis came through from the midfield in his Ligier to win a remarkable victory.

Over the years there have been tragedies as well. Lorenzo Bandini crashed at the chicane in 1967 and was burned to death in a raging fire; and in 1994 young Austrian Karl Wendlinger crashed at the same spot, the resulting head injuries effectively ending his F1 career.

Over the years the circuit has changed as Monaco has developed but the basic circuit remains as it was in 1929. In 1973 a new tunnel was built beneath the Loews Hotel and the track from Tabac to La Rascasse was reprofiled to make way for the new swimming pool. Later the Ste Devote and Rascasse Corners were tightened to slow the cars down and in 1986 the chicane was reprofiled for similar reasons.

People have been forecasting disaster for years, but Monaco survives each passing year even if the safety and facilities are out of step with all the other F1 circuits.

Monaco is more than a race. It is the most important Grand Prix of the year, the place where everyone wants to be. More deals are done at Monaco than at any other race and the glitter of the Principality rubs off on F1 as much as the glamour of F1 reflects on the city.

"This place gives us more than we give it," admits F1 boss Bernie Ecclestone.

In recent years pressure has grown for work to make it possible to build proper pits at Monaco and in 2002 Monaco revealed details of a long-term plan to create decent-sized pitlane and garages. This will necessitate the reprofiling of the Tabac, Swimming Pool and Rascasse sections.