Either inherited from Latin apage (“go away”), from Ancient Greek άπαγε (ápage), or alternatively borrowed from Arabic اِبْعَد (ibʕad, dialectally also abʕad), imperative of بَعِدَ (baʕida, “to go away”). As both words have the same meaning and could both easily have yielded Spanish aba, it is hardly possible to decide.