When did Saint Augustine become part of Florida?

"Florida" has been known as Florida since Ponce De Leon landed on 1513. Saint Augustine is the U.S.'s oldest city, founded at 1565. The Spanish didn't turn over Florida, including Saint Augustine, to the United States until 1821. In 1845, Florida became a state.