Which country became Britain's main rival in the 18th century