For the next 333 years, from 1565 when Spain first established a colony in the country until the Treaty of Paris on 10 December 1898, the Philippines was a Spanish colony (including the years 1762–1764 when the British controlled Manila and the port city of Cavite but not the whole country).