In 844 the town fell into the hands of the Arabs, but four years later they were driven out with help supplied by Pope Leo IV and was given to the count of Capua as a fief of the Holy See. In 877, however, the hypatus John (Joannes) II succeeded in recovering the lordship, which he established as a duchy under the suzerainty of the East Roman emperors. In the 11th century the duchy fell into the hands of the Norman counts of Aversa, afterwards princes of Capua, and in 1135 it was definitively annexed to his kingdom by Roger of Sicily.
In military history the town has played a conspicuous part. Its fortifications date back to Roman times, and a first-century mausoleum of the Roman general Lucius Munatius Plancus stands atop the Split Mountain. These fortifications were extended and strengthened in the 15th century, and indeed throughout the history of the Kingdom of Naples (later the Two Sicilies).