The Barbary pirates refused to cease their slaving operations, resulting in another bombardment by a Royal Navy fleet against Algiers in 1824. France invaded Algiers in 1830, placing it under colonial rule. Tunis was similarly invaded by France in 1881. Tripoli returned to direct Ottoman control in 1835, before falling into Italian hands in the 1911 Italo-Turkish War. As such, the slave traders now found that they had to work in accordance with the laws of their governors, and could no longer look to self-regulation. The slave trade ceased on the Barbary coast in the 19th and 20th centuries or when European governments passed laws granting emancipation to slaves.