Probably settled by Phoenicians in ancient times, Monaco was annexed by Marseilles and Christianized in the 1st cent. A.D. In the 7th cent. it was part of the kingdom of the Lombards, and in the 8th cent. of the kingdom of Arles. It was under Muslim domination (8th cent.) after the Saracens invaded France.
Monaco was ruled by the Genovese Grimaldi family from the 13th cent. In 1731 the male line died out, but the French Goyon-Matignon family, which succeeded by marriage, assumed the name Grimaldi. Monaco was under Spanish protection from 1542 to 1641, under French protection from 1641 to 1793, annexed to France in 1793, and under Sardinian protection from 1815 to 1861. The districts of Menton and Roquebrune (long part of Monaco) were incorporated (1848) into Sardinia, which in turn ceded them to France in 1860.
Monaco again came under French protection in 1861. In the late 1800s income from gambling by very wealthy visitors became Monaco's primary source of revenue. Until 1911, when the first constitution was promulgated, the prince was an absolute ruler. Rainier III, succeeded his grandfather, Louis II, as ruler of Monaco in 1949. In 1956, Rainier married Grace Kelly (1929–82), an American motion-picture actress, and a male heir, Albert, was born in 1958. Rainier worked to diversify Monaco's economy and make Monaco attractive to middle-class tourists.
In 1962 serious economic disagreements arose between France and Monaco, and new fiscal agreements (1963) severely curtailed the right of French citizens to use Monaco as a tax haven. The Monaco government also came into conflict with Aristotle Onassis, who owned majority interests in most businesses there; Monaco purchased his interests in 1967. Relations with France again became acrimonious in 2000 when Monaco was accused of being a center for money-laundering and France threatened to force the principality to tighten the regulation of its banks. Rainier died in 2005 and was succeeded as ruler by his son, Albert II.