According to Ibn Khaldun the town was founded by Banu Wargla who, accompanied by sections of the Maghrawa and Banu Ifran, left the Tlemcen region and founded Ouargla.
In 11th century, Banu Hilal, an Arab tribe living between Nile and Red Sea, settled in Tunisia, Tripolitania (western Libya) and Constantinois (eastern Algeria) which was Ouargla party.