Santa Margherita disputed its primacy with San Giacomo of Corte over a long period of time. Given its central position and with the advantage of having a long beach on which boats could be pulled up on dry palates, Santa Margherita eventually overcame Corte.
However, San Giacomo would succeed in obtaining its own administrative individuality in the period of the Ligurian Republic (1797 – 1806) and in the succeeding Napoleonic era up until 1812 when Napoleon would unite the two municipalities of Santa Margherita and San Giacomo into the city of Port Napoleon.
In Santa Margherita Ligure near St. Bernard's oratory on the road to St. Siro the French built a fort, now completely hidden.
San Siro, an agricultural parish, was more populated than Santa Margherita but felt itself exploited in a certain sense by the smaller center which had however greater logistic, and therefore political, importance.
With the Congress of Vienna, Liguria became a Duchy in the Kingdom of Sardegna. Santa Margherita, with San Giacomo and San Siro became the community of Santa Margherita Ligure to which many people added "of Rapallo".