In 1497 Spanish forces took Melilla, west of Oran, and the island of Djerba, south of Tunis, and went on to more important gains, with the bloody seizure of Oran in 1509, and the capture of Bougie and Tripoli in 1510. The Spanish capture of Tripoli cost them some 300 men, while the inhabitants suffered between 3,000 and 5,000 killed and another 5,000–6,000 carried off as slaves. Soon thereafter, however, they faced competition from the rapidly expanding Ottoman Empire in the east and were pushed back.