Though several Spanish expeditions charted the Gulf Coast, it was explorer José Antonio de Evia who in 1785 gave the bay and the island the name "Gálvezton" in honor of Spanish viceroy Bernardo de Gálvez. Louis Aury established a naval base at the harbor in 1816 to support the Mexican War of Independence. When he abandoned the base, it was then taken over by pirate Jean Lafitte, who temporarily transformed Galveston Island and the bay into a haven for outlaws before being ousted by the United States Navy. Following its independence from Spain, the new nation of Mexico claimed Texas as part of its territory. Settlements were established around the bay, including Galveston, Anahuac, Lynchburg, and San Jacinto. Following growing unrest, Texas revolted and gained independence in 1836 at the Battle of San Jacinto, near the bay along the San Jacinto River. The new Republic of Texas grew rapidly and joined the United States in 1845.