The name Texas, based on the Caddo word táyshaʼ (/t’ajʃaʔ/) “friend”, was applied, in the spelling Tejas or Texas, by the Spanish to the Caddo themselves, specifically the Hasinai Confederacy, the final -s representing the Spanish plural. The Mission San Francisco de los Tejas was completed near the Hasinai village of Nabedaches in May 1690, in what is now Houston County, East Texas. During Spanish colonial rule, in the 18th century, the area was known as Nuevas Filipinas (“New Philippines”) and Nuevo Reino de Filipinas (“New Kingdom of the Philippines”), or as provincia de los Tejas (“province of the Tejas”), later also provincia de Texas (or de Tejas), (“province of Texas”). It was incorporated as provincia de Texas into the Mexican Empire in 1821, and declared a republic in 1836. The Royal Spanish Academy recognizes both spellings, Tejas and Texas, as Spanish-language forms of the name of the U.S. State of Texas. The term “six flags over Texas” refers to several nations that have ruled over the territory. Spain was the first European country to claim the area of Texas. France held a short-lived colony. Mexico controlled the territory until 1836 when Texas won its independence, becoming an independent Republic. In 1845, Texas joined the union as the 28th state. The state’s annexation set off a chain of events that led to the Mexican–American War in 1846.