During the two centuries in which Mexico and the United States have shared a border, allegations of out-of-control immigration, with Mexican immigrants posing a threat to American security, have often been a staple of American politics and a source of friction and concern.

But the worry has worked both ways. In the immediate wake of Mexico’s successful war for independence from Spain, Mexican officials grew alarmed about illegal immigration from the United States. By the late 1820s, the situation on the border, located on the Sabine River that today separates Texas from Louisiana, appeared to be reaching the crisis stage.

Not all the immigration from the north was illegal. Starting in 1821, Stephen F. Austin, the man later referred to as “The Father of Texas,” brought hundreds of American immigrants to Mexican Texas, with the explicit approval and support of the Mexican government. The government, in order to populate the thinly settled province and build a bulwark against Indian attacks, promised the immigrants land—far more land than most of them would ever have acquired in the United States. At a time when a farm in Tennessee might encompass a quarter-section, or 160 acres, the standard grant in Austin’s Texas colony was a league, or more than 4,000 acres.

Dreams of El Dorado: A History of the American West In Dreams of El Dorado, H. W. Brands tells the thrilling, panoramic story of the settling of the American West. He takes us from John Jacob Astor's fur trading outpost in Oregon to the Texas Revolution, from the California gold rush to the Oklahoma land rush. He shows how the migrants' dreams drove them to feats of courage and perseverance that put their stay-at-home cousins to shame-and how those same dreams also drove them to outrageous acts of violence against indigenous peoples and one another. Buy

A common concern of farmers in the United States was that their children, upon reaching adulthood, would have to move away to find farms of their own. Lack of land was one of the principal forces driving America’s westward movement. In Texas, an American colonist could receive land enough for all his children and their children. Mexican law made princes of many who might have been paupers in the United States.

But many of the Americans who came to Texas did so beyond the auspices of Mexican law. By handfuls at first, then by scores, then by hundreds and thousands, Americans poured into Texas illegally. They seized whatever land parcels weren’t occupied and made them their homes. Mexican officials were few in Texas, and they were distracted by the turbulence that roiled Mexican politics in the aftermath of the war against Spain. The squatters could be in place for months or years before the government took notice. By then, the squatters thought of the land as their own, and they didn’t hesitate to defend it with deadly force.

Within several years of Austin’s arrival in Texas, the situation in Texas was spinning out of Mexico’s control. The government appointed a commission to examine the Texas question; at its head was Manuel de Mier y Terán, a general in the Mexican army, a former government minister and member of the Mexican congress, an engineer and a scientist. Terán reached Texas in the spring of 1828 and spent the next several months traveling about the settled regions. He visited San Antonio, which remained thoroughly Mexican. But farther east the American influence took hold. His party crossed the Guadalupe River. “On the eastern bank of this river there are six wooden cabins, whose construction shows that those who live in them are not Mexicans,” Terán wrote. “Though the house is a single piece, it has two rooms, a high one and a low one. In the latter is found the storeroom and kitchen, whose chimney sticks up on the outside, and in the higher part are the bedroom and living room.”

The Americans at first seemed standoffish. “I approached a cabin in hopes that its owner might offer me shelter, but it was in vain,” Terán wrote. “I learned later that the North Americans are not used to making such invitations. One arrives quite naturally, sure of being well received. But if one stops at the door, no one encourages him to come inside.”

Certain other Americans were as pleasant as could be. Terán’s party crossed the Colorado River on a ferry owned by an American named Beeson. “He is quite urbane, his family very honorable,” Terán noted. “Their services were very helpful to us.” Beeson’s wife had learned enough Spanish to explain how well Texas suited them. They had built a cabin and expanded their herd of cattle. “Madame says they have 1,200 pesos in savings. They have been on this land for five years, and they speak with great satisfaction of its fertility and good climate. In a word, they seem happy.”

Terán got to Austin’s colony, on the Brazos River, in late April. He was highly impressed with the energy and productivity of the immigrants, reckoning the colony’s annual corn crop at 64,000 bushels and the cotton crop at 240,000 pounds. Most of the former and essentially all of the latter were exported, as were mules that the Americans raised for sale in the West Indies. Terán had expected to see self-sufficient farms; what he found instead was a hive of commercial enterprise.

Terán asked the Americans what had brought them to Texas. Many mentioned the Texas climate. “To the north the freezing temperatures and snows create obstacles to their work for several months and force them to labor harder. In Texas they work year-round and therefore in greater moderation. In winter they clear and prepare the land that they will plant in the spring.” Others referred to the Mexican markets for the crops they raised. “In the north”—of Mexico—“agricultural production outstrips demand, and the prices are exceedingly low. The colonists hope for greater appreciation in the ports and on the coast of Mexico.” The Americans had big goals. “They hope to take over the supply of flour, grains, and meats in the ports.”

The residents of Austin’s colony had the makings of solid Mexican citizens, Terán allowed, even if they clung to their American ways. He couldn’t say the same about the Americans he encountered farther east. Nacogdoches, 50 miles from the border, marked the beginning of a kind of no-man’s-land that stretched to the Sabine River and American-owned territory. The inhabitants put even Terán’s party of soldiers on guard. “A great number of the foreigners who have entered the frontier are vicious and wild men with evil ways,” Terán wrote. “Some of them are fugitive criminals from the neighboring republic; within our borders they create disturbances and even criminal acts.” The United States and Mexico had not worked out border enforcement and extradition rules. “The inhabitants take advantage of their friends and companions to attack and to defend themselves and cross from one side to the other in order to escape punishment.”

At Nacogdoches, Terán reflected on what he had seen. “As one travels from Béxar”—San Antonio—“to this town, Mexican influence diminishes, so much so that it becomes clear that in this town that influence is almost nonexistent,” he wrote. “But where could such influence come from? Not from the population, because the ratio of the Mexican population to the foreign is one to ten; nor from its quality, because the population is precisely the contrary: the Mexicans of this town consist of what people everywhere call the abject class, the poorest and most ignorant.” The Americans in Nacogdoches operated an English-language school for their children. “The poor Mexicans neither have the resources to create schools, nor is there anyone to think about improving their institutions and their abject condition.” As a result, English had become the language of the region, and American influence appeared to be its future.

So what was to be done with the American immigrants? How to stem the invasion? Terán saw no easy answers. “Nature tells them that the land is theirs,” Terán wrote, “because, in effect, everyone can appropriate what does not belong to anyone or what is not claimed by anyone. When the occasion arises, they will claim the irrefutable rights of first possession.” Terán acknowledged that the legal immigrants of Austin’s colony were a different sort than the illegals of the border region. But he wasn’t sure that this made the future of Mexican Texas any more secure. “I must say in all frankness that everyone I have talked to here who is aware of the state of the country and devoted to its preservation is convinced, and has convinced me, that these colonies, whose industriousness and economy receive such praise, will be the cause for the Mexican federation to lose Texas unless measures are taken soon.”

What kind of measures? First, a stronger military presence. “On the frontier there are intrigues,” Terán wrote. And lest the intrigues become rebellions, Mexico needed more soldiers in Texas. Second, immigration should be suspended until it could be controlled. The border must be policed and illegal immigrants deported. Third, and most important, Mexico needed to make Texas truly Mexican, before the Americans made it irretrievably American. “The land of Texas, or at least its eastern part where its principal rivers begin to be navigable, should be reserved for Mexican settlers,” Terán declared. He didn’t advocate removing legal immigrants like those in Austin’s colony, but any new settlers must come from Mexico, not from the United States. Terán proposed that the government provide incentives to attract five thousand Mexicans to the Trinity River, to act as a bulwark against the Americans.

His plan would be expensive, Terán conceded. But he saw no other choice. If current trends persisted, Texas would be lost.

Adapted from Dreams of El Dorado: A History of the American West by H.W. Brands. Copyright © 2019 by H.W. Brands. Available from Basic Books on October 22.