The British and Spanish disputed the region in the 17th and 18th centuries ; it formally became the colony of British Honduras in 1854 .