Numidia was an ancient Berber kingdom located in the region of North Africa that today comprises Algeria and parts of today Tunisia, Libya and Morocco. The kingdom existed from the 3rd to the 1st century BC. Rome established it as a client kingdom after the Second Punic War and annexed it, first in 46 BC and again in 25 BC after a brief period of restored independence under King Juba II (30 BC–25 BC).