Numidia (202 BC – 46 BC) was an Ancient Berber kingdom in what is now Algeria and a smaller part of Tunisia, in North Africa. Numidia was originally divided between Massylii in the east and Masaesyli in the west. During the Second Punic War (218-201 BC), Massinissa, king of the Massylii, defeated Syphax of the Masaesyli to unify Numidia into one kingdom. The kingdom began as a sovereign state and later alternated between being a Roman province and being a Roman client state. It was bordered by the kingdoms of Mauretania (modern-day Morocco) to the west, the Roman province of Africa (modern-day Tunisia) to the east, the Mediterranean Sea to the north, and the Sahara Desert to the south. It is considered to be the first major state in the history of Algeria and the Berber world.