Salerno had been directly involved in the long war between Ostrogoths and Byzantines (535-553 AD) and assimilated in the Byzantine defensive system with the erection of the "turris maior" on the mount Bonadies, to control the valley below and the routes that led to the north.
The Byzantinum influence on Salerno began in 536 AD, with the peacefully occupation of the city by Flavius Belisarius, a famous general of Giustiniano I il Grande, and would have continued with alternating events for about a century. Unlike Naples, which had preferred to remain a subject of the Ostrogoths and undergo the siege only to be destroyed and depopulated (to the benefit of the splendor of Salerno) the Roman inhabitants of Bruttia and Lucania had received Belisarius with joy, when, in the name of the Emperor, he promised them deliverance from the yoke of the heretics and barbarians.
The presence of the Byzantines on territory greatly benefited Salerno, which renewed its urban aspect, reusing and expanding the existing structures. The ancient Roman Forum, in a more architectural guise, continued to constitute the vital center of the city; six other gates were opened in the walls: the Respizzi, the Nocerina, the Rateprandi, the Porta di Mare, the Elina and the Rotese. The defensive system of the city was strengthened with great fortification works, and the imposing "Turris Maior" of the castle was built, which represents one of the rare examples of Byzantine military architecture in Italy.
The important presence of the Byzantines in Salerno is unfortunately poorly documented. During the Byzantine period, also due to the Greek-Gothic wars there had been little interest in urban maintenance, and more had been invested in the construction of fortified military garrisons (the Castle) and in places representative of power (the Roman basilica became the seat of the Byzantine praetorium) and of worship (transformation of the Capitoline Temple into the Hagia Sophia). The lack of cleaning of the canals and the lack of management of the existing hydraulic works must have been the main cause of the floods, which are numerous, leading to a substantial elevation of the country level as can be assessed in the archaeological sites of the ancient Roman Baths, and of the Fruscione palace.
At the end of the 5th century, the area in San Pietro a Corte destined to the cold baths (*frigidarium*) in the thermal complex of the 1st–2nd century AD, was transformed into a cemetery church by the will of Socrates, a noble person of the Byzantine city. He built for himself and his family a funeral chapel that worked until the 8th century, housing many deceased including the young Theodenanda, died at the age of four.
The Byzantines domination however later lasted only fifteen years (from 553 to 568 AD), before the Lombards troops invaded almost the whole terrestrial peninsula. Like many coastal cities of southern Italy (Gaeta, Sorrento, Amalfi), the Byzantine Salerno initially remained untouched by the newcomers, falling only in 646 AD. It subsequently became part of the Duchy of Benevento.