The Barghawata (an aa Barghwata or Berghouata) wur a medieval Berber tribe confederation o the Atlantic coast o Morocco, belongin tae the Masmuda group o tribes. Efter allyin wi a failed Sufri Kharijite rebellion in Morocco against the Abbasids, thay established a kinrick (744 - 1058) in the aurie o Tamesna on the Atlantic coast atween Safi an Salé unner the leadership o Tarif al-Matghari.