The Vandals had occupied Roman North Africa in the early 5th century, and established an independent kingdom there. Under their first king, Geiseric, the formidable Vandal navy carried out pirate attacks across the Mediterranean, sacked Rome and defeated a massive Roman invasion in 468. After Geiseric's death, relations with the surviving Eastern Roman Empire normalized, although tensions flared up occasionally due to the Vandals' militant adherence to Arianism and their persecution of the Nicene native population. In 530, a palace coup in Carthage overthrew the pro-Roman Hilderic and replaced him with his cousin Gelimer. The Eastern Roman emperor Justinian took this as a pretext to interfere in Vandal affairs, and after he secured his eastern frontier with Sassanid Persia in 532, he began preparing an expedition under general Belisarius, whose secretary Procopius wrote the main historical narrative of the war. Justinian took advantage of, or even instigated, rebellions in the remote Vandal provinces of Sardinia and Tripolitania. These not only distracted Gelimer from the Emperor's preparations, but also weakened Vandal defences through the dispatch of the bulk of the Vandal navy and a large portion of their army under Gelimer's brother Tzazon to Sardinia.