The first railway in Monaco was completed in 1869 by the French PLM railway company as part of an international route between France and Italy. There were two stations, Monaco and Monte Carlo. The PLM company became part of SNCF in 1938.
In 1893, a metre gauge rack railway was constructed to connect Monaco with La Turbie, a medieval village perched on the hills above Monaco. However, the rails did not actually enter the Principality, terminating on French soil in the suburb of Beausoleil. The line closed in 1932.
Electric trams came to Monaco in 1898 with a line from the Place d’Armes to Saint Roman. Several other lines followed within the Principality. In 1900, the tram system was connected to that of Nice and in 1903 extended to Menton. The last trams ran in 1931.
Pressure of land use in the Principality has always been a problem, and in the 1950s a new tunnel was built from the original Monaco station, through the hills behind Monte Carlo, bypassing Monte Carlo station. The latter station was closed and the land occupied by it and the railway released for other uses. In the 1990s, a similar exercise was performed replacing the remaining line through the original Monaco station with a new line and station entirely underground.