The end of Spanish control of the seas was a result of