Pandulf IV was the Prince of Capua on three separate occasions. From February 1016 to 1022 he ruled in association with his cousin Pandulf II. In 1018, the ByzantinecatapanBoiannes destroyed the Lombard army of Melus of Bari and his Norman allies at Cannae. This victory brought the Byzantines recognition by all the princes of the Mezzogiorno, which had previously owed allegiance to the Holy Roman Emperor. Among these Pandulf was most ardent in his support of the Byzantines. He assisted Boiannes in capturing Melus' brother-in-law Dattus' tower on the Garigliano in 1020, but this brought a large army down from Germany. A detachment under Pilgrim, Archbishop of Cologne, marched down the Tyrrhenian coast and besieged Capua. In 1022 the prince was taken and a new prince, Pandulf, count of Teano, installed. Pandulf IV was brought in chains to the Emperor Henry II, who almost executed him before Pilgrim intervened on his behalf. He was then imprisoned in Germany for two years. He was released by Emperor Conrad II in 1024 at the request of Prince Guaimar III of Salerno, who was hoping for a new ally. Assisted by Guaimar and the Norman adventurer Rainulf Drengott, Pandulf immediately besieged Capua. In 1025, Boiannes, who had been busy on a Sicilian expedition, joined them with a huge force. In 1026, after a siege of18 months, the city fell. The count of Teano was given safe passage to Naples by the Byzantine commander. Pandulf resumed his rule and remained in power until 1038. In 1027, he defeated and deposed Sergius IV of Naples, but Sergius was reinstalled in 1029 by a Norman army under Rainulf, Pandulf's one-time ally, who in return received the county of Aversa, the first Norman toehold in the Mezzogiorno. Next, Sergius moved against the abbot of Montecassino. The previous abbot, Atenulf, who had supported Pandulf, had fled from the invading imperial army in 1024. The new abbot, Theobald, had been the candidate of the Emperor and the Pope. After inviting him to Capua, Pandulf threw him in prison, where he joined the deposed archbishop of Capua. In 1032, Pandulf turned his attention to Sergius' old ally, John V of Gaeta. He conquered Gaeta and took over the consular and ducal title of its ruler. For all this, he was called by the chronicler Aimé of Monte Cassino a fortissime lupe, the Wolf of the Abruzzi, a man of "wily and wicked deeds". Subsequently, Guaimar IV of Salerno, the son of Guaimar III, asked the two emperors—Eastern and Western—to come and resolve the many disputes rupturing Southern Italy. Only Conrad accepted. Arriving at Troia in 1038, he ordered Pandulf to restore stolen property to Monte Cassino. Pandulf sent his wife and son to ask for peace, giving 300 lbs of gold and a son and daughter as hostages. The emperor accepted Pandulf's offer, but the filial hostage escaped and Pandulf took refuge in his outlying castle of Sant'Agata de' Goti. Conrad took Capua and gave it to Guaimar with the title of Prince. He also recognised Aversa as a county of Salerno. Pandulf, meanwhile, fled to Constantinople, seeking the protection of his old Byzantine allies. The political dynamic having changed, however, Pandulf was imprisoned. Subsequently, Guaimar became an enemy of Emperor Michael IV and, before the latter's death, Pandulf was released from captivity. He returned to Italy in 1042. For the next five years, he and his few followers threatened Guaimar. In 1047, a watershed year in the history of the Mezzogiorno and the Lombards, Emperor Henry III, Conrad's son, came down and made the Drengot and Hauteville possessions his direct vassals. At Capua, he restored Pandulf to power for the last time. Pandulf died in his own princedom on 19 February 1049 or 1050.