The Sabaean Kingdom came into existence from at least the eleventh century BC. There were four major kingdoms or tribal confederations in South Arabia: Saba, Hadramout, Qataban and Ma'in. Saba is believed to be biblical Sheba and was the most prominent federation. The Sabaean rulers adopted the title Mukarrib generally thought to mean unifier, or a priest-king. The role of the Mukarrib was to bring the various tribes under the kingdom and preside over them all. The Sabaens built the Great Dam of Marib around 940 BCE. The dam was built to withstand the seasonal flash floods surging down the valley.