The Lombard city of Salerno had strong defences and, despite the use of stone-throwing artillery, the siege lasted a little over a year from its beginning in late 871 or early 872.
Prince Guaifer of Salerno led the defence, but the siege was only lifted by the arrival of an army of Lombards and Franks under the Emperor Louis II.
Louis II, King of the Lombards and Emperor of the Romans, fought a five-year campaign against the Emirate of Bari, which fell in February 871.
The Aghlabid emir Muḥammad II appointed one ʿAbd Allāh as wālī (governor) of al-Arḍ al-Kabīra (the Big Land, i.e., the Italian peninsula).
[10] The Vita et translatio sancti Athanasii neapolitani episcopi, a biography of the bishop of Naples, is a source for the embassy that preceded the attack.
[11] Among Arabic accounts, the Bayān of Ibn ʿIdhārī writes suggestively of ʿAbd Allāh's victories, but does not describe the end of the campaign.
According to the account in the Chronicon Salernitanum, forewarning of the attack came from an Amalfitan merchant, who had been entrusted with the message while staying Ifrīqiya by an Arab who had been the recipient of Prince Guaifer's generosity.
[2] Even Adelchis may have sought help from Louis—if the theory linking the composition of the poem De captivitate Ludovici imperatoris with the siege of Salerno is correct.
[14] The Aghlabid force under ʿAbd Allāh crossed from Ifrīqiya, landed in Calabria and marched overland to Salerno, according to the Chronicon Salernitanum.
[2] It forced the Frankish army that was besieging Taranto, where the last remnants of the emirate of Bari were holding out, to abandon the siege.
[2] After over a year of pleas and entreaties, Louis II, then at Rome, sent a Frankish army reinforced by Lombard contingents to relieve the siege.
According to the Chronicon Salernitanum, in the final week of the siege the Frankish army had marched using branches as camouflage and the besiegers had exclaimed "it is like a mountain comes against us".
[20] In the view of the Chronicon Salernitanum, the Aghlabids were God's avenging agents, sent to punish the Lombards for their betrayal of Louis II.
[24] The account of the siege of Salerno in the Chronicon Salernitanum may be the historical source for an episode in Li coronemenz Looïs, a 12th-century Old French chanson de geste.