Battle of Ostia
The naval Battle of Ostia took place in 849 in the Tyrrhenian Sea between a Muslim fleet and an Italian league of Papal, Neapolitan, Amalfitan, and Gaetan ships. The battle ended in favor of the Italian league, as they defeated the Muslims. It is one of the few events to occur in southern Italy during the ninth century that is still commemorated today, largely through the walls named after Leo and for the Renaissance painting Battaglia di Ostia by Raphael. Background
Starting in 827, Muslim forces began the conquest of Sicily and from 835, the Aghlabids began campaigning on the Italian mainland. Their invasions of Calabria and Apulia, as well as their attacks on other central Mediterranean islands, were probably undertaken as an extension of their conquest of Sicily, aiming to aid the conquest by attacking Byzantine positions in the region. Rome was raided by a Muslim force in 846, although it is not certain that the raiders came from Aghlabid territory. Another attack towards Rome took place in 849, leading to the Battle of Ostia. Battle
News of a massing of Muslim ships off Sardinia reached Rome early in 849. A Christian armada, commanded by Caesar, son of Sergius I of Naples, was assembled off recently refortified Ostia, and Pope Leo IV came out to bless it and offer a mass to the troops. After the Muslim ships appeared, battle was joined with the Neapolitan galleys in the lead. Midway through the engagement, a storm divided the Muslims and the Christian ships managed to return to port. The Muslims, however, were scattered far and wide, with many ships lost and others sent ashore. When the storm died down, the remnants of the Muslim fleet were easily picked off, with many prisoners taken. Aftermath
In the aftermath of the battle, much flotsam and jetsam washed ashore and was pillaged by the locals, per jus naufragii. The prisoners taken in battle were forced to work in chain gangs building the Leonine Wall which was to encompass the Vatican Hill. Rome would never again be approached by a Muslim army. See also 

 Papal Navy

Notes

References

Sources
Llewellyn, Peter. Rome in the Dark Ages. London: Faber and Faber, 1970. Ostia
Ostia
Military history of Naples
Duchy of Gaeta
Ostia
Duchy of Amalfi
Ostia (Rome)
Ostia
849