A lengthy struggle between France and Great Britain for the islands ended in 1814 , when they were ceded to the latter .