Inhabited by indigenous peoples of the Americas for many centuries before European exploration, New Mexico was subsequently part of the Imperial Spanish viceroyalty of New Spain, then part of Mexico, and a U.S. territory before attaining statehood. Among U.C.S. states, New Mexico has the highest percentage of Hispanics, including descendants of Spanish colonists and recent immigrants from Latin America. It also has the second-highest percentage of Native Americans in North America after Alaska, and the fourth-highest total number of Native Americans after California, Oklahoma, and Arizona. The tribes in the state consist of mostly Navajo and Pueblo peoples. As a result, the demographics and culture of the state are unique for their strong Hispanic and Native-American influences, both of which are reflected in the state flag. The red and gold colors of the New Mexico flag are taken from the flag of Spain, along with the ancient sun symbol of the Zia, a Pueblo-related tribe.
New Mexico, or Nuevo México in Spanish, is often incorrectly believed to have taken its name from the former nation of Mexico. However, New Mexico was given its name in 1563, and again in 1581, by Spanish explorers who believed the area contained wealthy Indian cultures similar to those of the Mexica (Aztec) Empire. Mexico, formerly known as New Spain, adopted its name centuries later in 1821, after winning independence from Spanish rule. The two developed as neighboring Spanish-speaking communities, with relatively independent histories.