The history of Monaco as a unique geographic region goes all the way back to the ancient world. The Greeks colonized the area which they named Monoikos and legend even has it that Hercules visited the area during his mythic quest. The Romans incorporated it into their empire and Virgil wrote about the legends of the area saying that Hercules had driven out all the inhabitants and lived there alone for a time. When the Roman Empire collapsed Monaco was pillaged by the Saracens and other barbarians before being driven out in 975 and repopulated by the Ligurians, from the Italian region of Genoa. In 1191 the Holy Roman Emperor Henry VI gave control of the region to the City-State of Genoa and in 1215 a group of Genoese soldiers arrived and built a fortress at the top of the famous Rock of Monaco, the dominant geographic feature in the area. This was during the time of the fratricidal Italian wars between the Guelph and Ghibelline factions. This was a very long-standing feud that went on so long most forgot what it had originally been about but the root was a conflict over who had supreme authority in Italy. The Guelph faction supported the Pope while the Ghibelline faction supported the Holy Roman Emperor of Germany. The troops who built the castle on the Rock of Monaco were Ghibellines. They encouraged settlement of the area and tried to lure more people from Genoa to Monaco.
In the course of the conflicts at home eventually several Guelph families made for Monaco, the most prominent being the Grimaldi and Fieschi families. The Grimaldis were an old family of Genoa, descended from Otto Canella and who took their name from that of his son Grimaldo. This was the origin of the current Princely family's rule over Monaco. In 1297, on the night of January 8, under the leadership of Francois Grimaldi he and his Guelph faction seized control of the fortress on the Rock of Monaco by dressing as monks and hiding their swords under their long robes. This event is still remembered in monuments and on the government flag of Monaco to this day. So it was that the House of Grimaldi became the lords of Monaco and their rule has remained, almost completely unbroken from that time to today. The only interruption being their short occupation by the French from 1793 to 1814. The Grimaldi family became one of the most prominent Italian families from then on with some becoming army officials, government ministers and even cardinals and doges of the Republic of Genoa. The situation of Monaco did not really change until the outbreak of the horrific French Revolution when republican forces marched in and took over Monaco as part of the First French Republic.
During that time, until the fall of Emperor Napoleon, the history of Monaco was the history of France. However, after the defeat of Napoleon the independence of Monaco was restored under the House of Grimaldi by the Congress of Vienna in 1815 though it was made a protectorate of the Kingdom of Piedmont-Sardinia. This situation lasted until 1861 with the signing of the Franco-Monegasque Treaty. Piedmont-Sardinia had been trying to make nice with the French and the agreement confirmed the sovereignty of Monaco and from that time until 1911 the Prince of Monaco was an absolute monarch. In 1863 the Monte Carlo Casino opened and in the years that followed the principality underwent a great deal of growth and economic expansion, aided by the establishment of a railroad link with France. It soon gained a reputation as an ideal vacation spot for the elites of Europe. Politically things remained the same until the summer of 1918 when there was a succession crisis in the House of Grimaldi. The sovereign prince, Albert I, had one son who was unmarried and no grandchildren to succeed him. In his absence the Monegasque throne would have passed to his distant cousin Duke Wilhelm von Urach. Naturally, during World War I, the French were not keen on the idea of a German noble taking over a country on their southern coast. The treaty between France and Monaco was amended so that Monaco would become a French protectorate and that if the family died out France would take over the country. The new laws also said that the Prince could adopt an heir but that all future princes would have to have French approval. Prince Louis later acknowledged as his own a daughter, Charlotte, who became his heir, though there was doubt of the legality of this. In any event, it did not finally matter as she abdicated her position to the future Prince Ranier III. Duke Wilhelm von Urach later renounced his rights to the succession and passed them to his French cousins though he kept about 3,000 books from the Monaco library which are still kept at what had been his home in the castle of Lichtenstein.
World War II brought a great deal of turmoil to Monaco as the Sovereign Prince, Louis II, was partial to the French and remained so after the establishment of the regime in Vichy. Louis was an accomplished soldier and a good friend of his old comrade Marshal Philippe Petain. The public, however, in those days still felt very close to Italy and often favored the cause of Benito Mussolini. In 1943 the Italians occupied Monaco and set up a pro-fascist local government which lasted until Mussolini fell from power in Italy after which time the Germans came in and occupied the principality and, as they did everywhere, began deporting the small Jewish population to concentration camps. The future Prince Ranier III had favored the Allied side and was decorated for courage while fighting with the French army early on. Prince Louis, in an act of humanity, sent his police out to warn the Jews and others in advance that the Gestapo were coming to take them away and this allowed many to escape before the hammer fell. At the end of the war, as the German armies were driven out of France, Monaco was liberated.
In 1949 Prince Louis II died and Prince Ranier III succeeded to the throne and began what was to be probably the greatest period of expansion and success for Monaco in her history. He made many changes to modernize the country and improve government, public works and encourage tourism and new business opportunities in Monaco. The international profile of the country was greatly raised, especially after his marriage to the famous American actress Grace Kelly in 1956. Over the years the country became famous out of all proportion to its tiny size for its scenic beauty, sporting events, exciting night life, luxurious hotels and glamorous casinos where the rich and famous frolicked. In 1962 the Constitution of Monaco was amended to, among other things, abolish the death penalty and give women the right to vote. In 1993 the Principality of Monaco became a full member with voting rights of the United Nations and in 2002 a new treaty with France was negotiated to eliminate the danger of Monaco being absorbed by France if the Prince of Monaco dies without an heir. However, Monaco remains a French protectorate with Paris responsible for the national security of the country.