Following the defeat, Spain was confined to Mers-el-Kébir, until 1509, when they attacked Oran, achieving a great victory. The war was ultimately won by Spain in 1512, when the Zayyanid emirate became a vassal of the Aragonese crown.