Luni was a major bishopric of Northern Italy in the Middle-Ages. As far back as the Dark Ages, Charlemagne granted the bishops privileges, reaffirmed in year 900 by King Berenger II of Italy, who appointed Oberto I marquess of Luni in 940. This latter managed to enlarge his estate as widely as from Carrare to Tortona and Genoa. This territory became the eastern March of Liguria, which included a portion of Tuscany, Parma and Piacenzia.

In 963, his son Adalberto added new possessions to their estate, among which Sarzana. The bishopric of Luni increased its power in the XIth century through the building and development of the Francigene road, which the pilgrims coming from all over Europe took to go to Rome.

Because of the divisions between the various branches descending from Oberto (the Pallavicini, Massa Corsica, Malaspina, Este …) combined to the disappearance of a strong central government, the bishopric of Luni lost a part of its influence, isolated among more powerful fiefs and expanding cities.

At Luni, the bishops took over the position vacated by Oberto's descendants, who had left to lead other battles. But the bishops did not really achieve a leadership on the political scene of Northern Italy. Besides, the population left  the bishopric to settle in Sarzana. So did the bishops, though they went on bearing the title of bishops or counts of Luni.

The fight between the bishops and their neighbours the marquesses of Malaspina lasted for several decades. It was completely ended in 1306 only, with Castelnuovo Peace, signed by Dante on behalf of the marquesses.

The peace back again, the clergy decided to grant a bishopric to a member of the powerful family and Gherardino Malaspina, son of a marquess from the House of the Spino Fiorito, was appointed bishop in 1312. Thanks to this appointment, the bishops intended to earn the protection of the powerful Malaspina marquesses to resist Pisa and Lucca pressures.

Yet Gherardino was not able to compete with Castruccio Castracani, viscount of Lucca, who got hold of Luni and Sarzana. Gherardino eventually gave up Sarzana and died in 1318.