Lando did not submit to Siconulf or Salerno for very long. Capua was invaded by Salerno and Naples in 859, but defeated them. Pando (ruled 861–862) declared Capua independent of Salerno in 862. On his death in the same year, a dispute arose over who should be the next count. Pando's son Pandenulf was deposed by his uncle Landulf II. Landulf was also the bishop of Capua, so he governed both politics and religion in the county. When he died in 879, a civil war started over the throne. The two claimants were Pandenulf, the previous count who had been deposed, and Lando III, another grandson of Landulf I. Salerno allied with Lando III and Benevento with Pandenulf. They both ruled in different parts of the county, and they both made their sons Bishop of Capua. Pandenulf successfully held the throne in Capua during the civil war, until Lando III captured the city in 882.