The subtitle of Carrie Gibson’s book is The Epic and Forgotten Story of Hispanic North America. El Norte lives up to it.

These 437 pages are an important correction to centuries of American history which have mostly neglected the vital role of Spanish pioneers (and Native Americans) in favor of settlers from England, Ireland and Scotland. As the author quotes Walt Whitman, Americans long ago tacitly abandoned themselves “to the notion that our United States have been fashioned from the British Islands … which is a great mistake …

“To that composite American identity of the future, Spanish character will supply some of the most needed parts.”

This book proves Whitman’s prescience in a hundred ways: the history of Hispanics in the US is indeed “not a separate history of outsiders or interlopers, but one that is central to how the United States has developed”.

The first surprise is the role of Spain in the revolutionary war. In Paris in December 1776, Benjamin Franklin met in secret with the Count of Aranda, quickly convincing him Spain needed to side with the Americans. Ships leaving New England already called at Spanish ports such as Bilbao and Cádiz to purchase cod and flour. Soon their holds were also bulging with millions of reales’ worth of bullets, gunpowder, bombs, rifles and tents. Three years later, the Spanish governor in New Orleans, Bernardo de Gálvez, sent 1,300 men to attack British outposts in west Florida.

To that composite American identity of the future, Spanish character will supply some of the most needed parts Walt Whitman

Of course, Gibson’s narrative begins much earlier, when the Spanish began their forays into the New World. The author reminds us that the indigenous urban culture of what is now Mexico was much more advanced than anything the conquistadors left behind in Europe.

Tenochtitlan (on the site of Mexico City) had a population of 150,000, “far larger than any European city”. Hernán Cortés arrived there in 1519 and reported to the crown he could “not describe one-hundredth of all the things which could be mentioned”, including a market where “more than 60,000 people come each day to buy and sell, and where every kind of merchandise … is found: provisions as well as … ornaments of gold and silver, lead, brass, copper, tin stones, shells bones and feathers”. When he met Emperor Moctezuma, Cortés was taken to a “vast compound of palaces, apartments, libraries, warehouses, and even a zoo”.

With the typical solicitude of the invader, Cortés soon kidnapped Moctezuma. But he was forced to retreat in 1520, after a battle that killed 400 Spaniards and thousands of Tlaxcala soldiers. A year later, Cortés returned. A plague in the Valley of Mexico would eventually kill millions. The capital fell.

Gibson paints an extremely broad canvas over eight centuries, from early Spanish colonies in Florida and the founding of Louisiana to the battle between the US and Mexico over Texas and Hispanic settlements in California. She reminds us of the immense diversity of Native American culture before the arrival of all Europeans. There were probably 300,000 Native Americans in Alta California before the Spanish arrived, and they spoke “roughly 90 languages under the umbrella of seven broader linguistic families”.

A statue of the 18th-century Spanish missionary Father Junípero Serra at Mission San Juan Capistrano, in California. Photograph: Mike Blake/Reuters

The natives offered resistance. In 1772, a priest in San Diego wrote that Spanish troops “deserve to be hanged on account of the continuous outrages which they are committing in seizing and raping the women”. Three years later, 600 natives attacked the mission with “so many arrows that you could not possibly count them”. The mission burned but it was rebuilt five years later, and by 1823 there were 21 such sites up and down the California coast, “almost all of them concerned with the conversion and subsequent labor of the Indians”. Los Angeles and San José de Guadalupe, on the southern edge of San Francisco, were established for civilian settlement.

Gibson also reminds us of the racism which has underpinned the Mexican-American relationship for at least 200 years.

“Whiteness in the United States,” she writes, “became bound up with the idea of manifest destiny and providence, that the Anglo-Protestants were somehow chosen to spread themselves across the continent.” In 1847, during the Mexican-American war, the American Review said: “Mexico was poor, distracted, in anarchy and almost in ruins” and asked: “What could she do … to impede the march of our greatness?

“We are Anglo-Saxon Americans; it was our ‘destiny’ to possess and to rule this continent … We were a chosen people, and this was our allotted inheritance, and we must drive out all other nations.”

This point of view persists. In the 2000s, the historian Samuel Huntington wrote that “America was created by … settlers who were overwhelmingly white, British and Protestant” – and therefore the arrival of Hispanics in large numbers remained a direct threat. Huntington denigrated such immigrants as people with “dual nationalities and dual loyalties”, because of their Spanish language and Catholic religion.

Of course no recent public figure has done more to stoke such prejudices than our current president. Gibson’s sprawling work makes a major contribution by reminding us of the falseness of Donald Trump’s xenophobic narrative. Her rich account leaves no doubt that America is a vastly more interesting place because of the millions of Hispanic immigrants who have been arriving on our shores for more than 600 years.