Colonialism ended worldwide in the 18th century, as most countries followed the example set during the American revolutionary war.