During his civil war Julius Caesar defeated the partisans of Pompey at the Battle of Thapsus in 46 BC. After the battle the previously independent kingdom of Numidia, whose king, JubaI had sided with Pompey, was divided. Part of it was assigned to the Kingdom of Mauritania, and the other was added to the Roman province of Africa. The Kingdom of Mauritania was founded in 33 BC and bequeathed to Rome by King Bocchus II. The kingdom was initially under direct Roman rule. In 25 BC Augustus appointed Juba II as ruler of the client kingdom, but he did nothing to pacify the hinterland. In 23 AD his son Ptolemy succeeded him and put down an uprising against Rome. When Ptolemy visited Rome in 40 AD, however, Caligula had him murdered, and annexed the kingdom. The revolt that erupted was suppressed in 44 AD. Claudius divided the territory of the former kingdom into the provinces Mauretania Caesariensis, with its capital at Colonia Claudia Caesariensium Iol, now Cherchell, and Mauretania Tingitana, with its capital initially at Volubilis, and later at Tingis, today's Tangier.