In 1697 , Spain recognized French dominion over the western third of the island , which in 1804 became Haiti .