In the 5th century BC a Phoenician trading station, which was named by the Romans according to the Heracles temple Herculis Monoeci portus, was established in the territory of the current Monaco. In the 6th century the territory of Monaco was temporarily ruled by the Visigoths, then it belonged to the Frankish Empire.
In 1162 the Genoa Merchants were granted a right of store in Monaco. At the end of the 13th century the Monaco fortress fell into the hands of François Grimaldi. According to legend, it was acquired through deceit: he asked to enter the fortress in the robe of the Franciscan monk. The Grimaldis definitely dominated Monaco in 1419. Since the 15th century the rule of this family (mainly under French protection except for a few short periods) continues until today. In 1793 Monaco was defeated by the French revolutionary forces and remained under the French administration until 1814. In 1815 it was agreed by the Congress of Vienna that Monaco will remain under the protectorate of the Kingdom of Sardinia. In the revolutionary year of 1848 Monaco lost 95 % of its territory when two Monaco cities Menton and Roquebrune declared independence and separated. The remaining part of Monaco gained sovereignty in 1861 when the Franco-Monegasque Treaty was concluded with France. From 1850 Monaco was faced with a difficult economic situation, as the territorial loss in 1848 represented also an economic loss. The Prince of Monaco Charles III. of Monaco decided to improve the economic situation of his country and thus in 1856 the first seaside spas with casino were built in the territory of Monaco. However, the real boom came with the establishment of Monte Carlo and connection of Monte Carlo to the railways from France. Since 1865 Monaco was in the customs union with France. From 1949 until 2005 the territory was ruled by prince Rainier III., who liberalized the constitution to strengthen the rights of the National Council. After his death, the rule was taken by the his son Albert II.. From 1963 until 1993 the strongest party was National and Democratic Union (UND), since 1993 Campora has an absolute majority. In the same year, Monaco became a member of the United Nations Organisation. It is also a member of the OSCE.