# History of Mexico–United States relations

The United States of America shares a unique and often complex relationship with the United Mexican States. With shared history stemming back to the Texas Revolution (1835–1836) and the Mexican–American War (1846–1848), several treaties have been concluded between the two nations, most notably the Gadsden Purchase, and multilaterally with Canada, the North American Free Trade Agreement (NAFTA). Mexico and the United States are members of various international organizations, such as the Organization of American States and the United Nations. Boundary disputes and allocation of boundary waters have been administered since 1889 by the International Boundary and Water Commission, which also maintains international dams and wastewater sanitation facilities. Once viewed as a model of international cooperation, in recent decades the IBWC has been heavily criticized as an institutional anachronism, by-passed by modern social, environmental and political issues. Illegal immigration, arms sales, and drug smuggling continue to be contending issues in 21st-century U.S.-Mexico relations.

## Post-Columbian era
### Early history

U.S.–Mexico relations grew out of the earlier relations between the fledgling nation of the United States and the Spanish Empire and its viceroyalty of New Spain.

## Post-American Revolution

Modern Mexico formed the core area of the Viceroyalty of New Spain at the time the United States gained its independence in the American Revolutionary War (1775–1783). Spain had served as an ally to the American colonists in that war.
The aspect of Spanish-American relations that would bear most prominently on later relations between the U.S. and Mexico was the ownership of Texas. In the early 19th century the United States claimed that Texas was part of the territory of Louisiana, and therefore had been rightfully acquired by the United States as part of the Louisiana Purchase from France in 1803. The Spanish, however, claimed it was not, as the western boundaries of Louisiana were not clearly defined. In 1819 the dispute was resolved with the signing of the Adams–Onís Treaty, in which the United States relinquished its claims to Texas and instead purchased Spanish Florida.
In 1821 New Spain gained its independence from Spain and established the First Mexican Empire under the rule of Agustín de Iturbide, who had initially fought in the royal army against the insurgents in the independence from Spain. Independent Mexico was soon recognized by the United States. The two countries quickly established diplomatic relations, with Joel Poinsett as the first envoy. In 1828 Mexico and the United States confirmed the boundaries established by the Adams–Onís Treaty by concluding the Treaty of Limits, but certain elements in the United States were greatly displeased with the treaty, as it relinquished rights to Texas. Poinsett, a supporter of the Monroe Doctrine, was convinced that republicanism was the only acceptable form of government for all countries in the Americas, and tried to influence the government of Agustín de Iturbide, which was beginning to show signs of weakness and divisiveness. Poinsett was initially sent to negotiate the acquisition of new territories for the United States, including Texas, New Mexico, and Upper California, as well as parts of Lower California, Sonora, Coahuila, and Nuevo León; but Poinsett's offer to purchase these areas was rejected by the Mexican Ministry of Foreign Affairs headed by Juan Francisco de Azcárate. He became embroiled in the country's political turmoil until his recall in 1830, but he did try to further U.S. interests in Mexico by seeking preferential treatment of U.S. goods over those of Britain, attempting to shift the U.S.–Mexico boundary, and urging the adoption of a constitution patterned on that of the U.S. Poinsett often interfered in the Affairs of the newly born Republic, and provoked disagreements with British charge d'affaires Henry George Ward. Texas remained a focal point of U.S-Mexico relations for decades. The relationship was further affected by internal struggles within the two countries: in Mexico these included concerns over the establishment of a centralized government, while in the United States it centered around the debate over the expansion of slavery, which was expanded to the Mexican territory of Texas. Some Mexican intellectuals, including José Vasconcelos would later assign the term Poinsettismo, in reference to Joel Roberts Poinsett, to designate any act of political or cultural meddling or interference by the United States in Mexican and Latin American affairs.
Beginning in the 1820s, Americans led by Stephan F. Austin and other non-Mexicans began to settle in eastern Texas in large numbers. These Anglo-American settlers, known as Texians, were frequently at odds with the Mexican government, since they sought autonomy from the central Mexican government and the expansion of black slavery into Mexico, which had abolished the institution in 1829 under Mexican president Vicente Guerrero. Their disagreements led to the Texas Revolution, one of a series of independence movements that came to the fore following the 1835 amendments to the Constitution of Mexico, which substantially altered the governance of the country. Prior to the Texas Revolution the general public of the United States was indifferent to Texas, but afterward, public opinion was increasingly sympathetic to the Texans. Following the war a Republic of Texas was declared, though independence was not recognized by Mexico, and the boundaries between the two were never agreed upon. In 1845 the United States annexed Texas, leading to a major border dispute and eventually to the Mexican–American War.

### Mexican–American War (1846–1848)

The Mexican–American War was fought from 1846 to 1848. Mexico refused to acknowledge that its runaway state of Texas had achieved independence and warned that annexation to the United States would mean war. The United States annexed Texas in late 1845, and the war began the next spring. U.S. President James K. Polk encouraged Congress to declare war following a number of skirmishes on the Mexican–American border. The war proved disastrous for Mexico; the Americans seized New Mexico and California and invaded Mexico's northern provinces. In September 1847, U.S. troops under General Winfield Scott captured Mexico City. The war ended in a decisive U.S. victory; the Treaty of Guadalupe Hidalgo ended the conflict. As a result, Mexico was forced to sell all of its northernmost territory, including California and New Mexico, to the United States in the Mexican Cession. Additionally, Mexico relinquished its claims to Texas, and the United States forgave Mexico's debts to U.S. citizens. Mexicans in the annexed areas became full U.S. citizens.
There had been much talk early in the war about annexing all of Mexico, primarily to enlarge the areas open to slavery. However, many Southern political leaders were in the invasion armies and they recommended against total annexation because of the differences in political culture between the United States and Mexico.
In 1854 the United States purchased an additional 30,000 square miles (78,000 km$^2$) of desert land from Mexico in the Gadsden Purchase; the price was $10 million. The goal was to build a rail line through southern Arizona to California.

### 1850s

Mexican President Antonio López de Santa Anna sold Mexican territory to the United States in which is known as the Gadsden Purchase, allowing the U.S. to build a railway line more easily through that region. That purchase played a significant role in the ouster of Santa Anna by Mexican liberals, in what is known as the Revolution of Ayutla, since it was widely viewed as selling Mexico's patrimony.
As the liberals made significant political changes in Mexico and a civil reform war broke out between conservative opponents to the liberal reform, the liberal government of Benito Juárez negotiated with the U.S. to enable the building of an interoceanic route in southern Mexico. A treaty was concluded in 1859 between Melchor Ocampo and the U.S. representative Robert Milligan McLane, giving their names to the McLane-Ocampo Treaty. The U.S. Senate failed to ratify the treaty. Had it passed, Mexico would have made significant concessions to the U.S. in exchange for cash desperately needed by the liberal Mexican government.

## Post-American Civil War
### 1860s

In 1861, Mexican conservatives looked to French leader Napoleon III to abolish the Republic led by liberal President Benito Juárez. France favored the secessionist Southern states that formed the Confederate States of America in the American Civil War, but did not accord it diplomatic recognition. The French expected that a Confederate victory would facilitate French economic dominance in Mexico. Realizing the U.S. government could not intervene in Mexico, France invaded Mexico and installed an Austrian prince Maximilian I of Mexico as the puppet ruler of a Second Mexican Empire in 1864. Owing to the shared convictions of the democratically elected government of Juárez and U.S. President Lincoln, Matías Romero, Juárez's minister to Washington, mobilized support in the U.S. Congress and the U.S. protested France's violation of the Monroe Doctrine. Once the American Civil War came to a close in April 1865, the U.S. allowed supporters of Juárez to openly purchase weapons and ammunition and issued stronger warnings to Paris. Napoleon III ultimately withdrew his army in disgrace, and Emperor Maximilian, who remained in Mexico even when given the choice of exile, was executed by the Mexican government in 1867. The support that the U.S. had accorded the liberal government of Juárez, by refusing to recognize the government of Maximilian and then by supplying arms to liberal forces, helped improve the U.S.–Mexican relationship.
At war's end numerous Confederates fled to exile in Mexico. Many eventually returned to the U.S.

### The Porfiriato (1876–1910)

With general Porfirio Díaz's seizure of the presidency in 1876, relations between Mexico and foreign powers, including the United States changed. It became more welcoming to foreign investment in order to reap economic gain, but it would not relinquish its political sovereignty. Díaz's regime aimed to implement "order and progress," which reassured foreign investors that their enterprises could flourish. Díaz was a nationalist and a military hero who had fought ably against the French Intervention (1862–67). The U.S. had aided the liberal government of Benito Juárez by not recognizing the French invaders and the puppet emperor that Mexican conservatives invited to rule over them, and the U.S. had also provided arms to the liberals once its own civil war was over. But Díaz was wary of the "colossus of the north" and the phrase "Poor Mexico! So far from God, so close to the United States" (Pobre México: tan lejos de Dios y tan cerca de los Estados Unidos) is attributed to him.
Díaz had ousted president Sebastián Lerdo de Tejada in the Revolution of Tuxtepec (1876). The U.S. did not recognize the Díaz government until 1878, when Rutherford B. Hayes was president. Given that France had invaded Mexico in 1862, Mexico did not initially restore diplomatic relations with it or other European powers, but did pursue a "special relationship" with the United States. One issue causing tension between Mexico and the U.S. were indigenous groups whose traditional territories straddled what was now an international boundary, most notably the Apache tribe. The Apache leader Geronimo became infamous for his raids on both sides of the border. Bandits operating in both countries also frequently crossed the border to raid Mexican and American settlements, taking advantage of mutual distrust and the differing legal codes of both nations. These threats eventually spurred increased cooperation between American and Mexican authorities, especially when concerning mounted cavalry forces. Tensions between the U.S. and Mexico remained high, but a combination of factors in the U.S. brought about recognition of the Díaz regime. These included the need to distract the U.S. electorate from the scandal of the 1876 election by focusing on the international conflict with Mexico as well as the desire of U.S. investors and their supporters in Congress to build a railway line between Mexico City and El Paso, Texas.
With the construction of the railway line linking Mexico and the United States, the border region developed from a sparsely populated frontier region into a vibrant economic zone. The construction of the railway and collaboration of the United States and Mexican armies effectively ended the Apache Wars in the late 1880s. The line between Mexico City and El Paso, Texas was inaugurated in 1884.
An ongoing issue in the border region was the exact boundary between Mexico and the U.S., particularly because the channel of the Rio Grande shifted at intervals. In 1889, the International Boundary and Water Commission was established, and still functions in the twenty-first century.

### The Taft–Díaz summit

In 1909, William Howard Taft and Porfirio Díaz planned a summit in El Paso, Texas, and Ciudad Juárez, Mexico, a historic first meeting between a U.S. and a Mexican president, the first time an American president would cross the border into Mexico, and only the second international trip by a sitting president. Diaz requested the meeting to show U.S. support for his planned eighth run as president, and Taft agreed to support Diaz in order to protect the several billion dollars of American capital then invested in Mexico. Both sides agreed that the disputed Chamizal strip connecting El Paso to Ciudad Juárez would be considered neutral territory with no flags present during the summit, but the meeting focused attention on this territory and resulted in assassination threats and other serious security concerns. The Texas Rangers, 4,000 U.S. and Mexican troops, U.S. Secret Service agents, BOI agents (later FBI) and U.S. marshals were all called in to provide security. An additional 250 private security detail led by Frederick Russell Burnham, the celebrated scout, was hired by John Hays Hammond, a close friend of Taft from Yale and a former candidate for U.S. vice president in 1908 who, along with his business partner Burnham, held considerable mining interests in Mexico. On October 16, the day of the summit, Burnham and Private C.R. Moore, a Texas Ranger, discovered a man holding a concealed palm pistol standing at the El Paso Chamber of Commerce building along the procession route. Burnham and Moore captured and disarmed the assassin within only a few feet of Taft and Díaz.

### The Mexican Revolution

The United States had long recognized the government of Porfirio Díaz, once the U.S. recognized his government since he had first come to power by coup. As Díaz approached eighty years old, he gave an interview to a journalist working for a U.S. publication, saying he was not going to run in the scheduled 1910 elections. This set off a flurry of political activity in Mexico about presidential succession. For the U.S., it wanted the new president to continue Díaz's policies that had been favorable to U.S. business interests and produced stability domestically and internationally. Díaz reneged on his promise not to run, exiled the most viable candidate to continue his policies, General Bernardo Reyes and had the most popular opposition candidate, Francisco I. Madero jailed. After the November elections, political unrest in Mexico became open rebellion in Morelos and in northern Mexico. The Mexican Federal Army was unequal to the challenges of the insurgents. Díaz resigned and went into exile, an interim government was installed, and new elections were held in October 1911. These were won by Madero. Initially, the U.S. was optimistic about Madero. He had disbanded the rebel forces that had forced Díaz to resign; retained the Federal Army; and appeared to be open to policies favorable to the U.S., so that the U.S. supported the transition. The U.S. began to sour on the relationship with Madero and began actively working with opponents to the regime. Wilson, who took office shortly after Madero's assassination in 1913, rejected the legitimacy of Huerta's "government of butchers" and demanded that Mexico hold democratic elections. After U.S. navy personnel were arrested in the port of Tampico by Huerta's soldiers, the U.S. seized Veracruz, resulting in the death of 170 Mexican soldiers and an unknown number of Mexican civilians.
Wilson sent a punitive expedition led by General John J. Pershing deep into Mexico; it deprived the rebels of supplies but failed to capture Villa.
Meanwhile, Germany was trying to divert American attention from Europe by sparking a war. It sent Mexico the Zimmermann Telegram in January 1917, offering a military alliance to reclaim New Mexico, California, Nevada, Arizona and Texas, land the United States had forcibly taken via conquest in the Mexican–American War. British intelligence intercepted the message, passing it on the U.S. government. Wilson released it to the press, escalating demands for American entry into the European War. The Mexican government rejected the proposal after its military warned of massive defeat if they attempted to follow through with the plan. Mexico stayed neutral; selling large amounts of oil to Britain for her fleet.

### 1920–1940

Following the end of the military phase of the Mexican Revolution, there were claims by Americans and Mexicans for damage during the decade-long civil war. The American-Mexican Claims Commission was set up to resolve them during the presidency of revolutionary general Alvaro Obregón and U.S. president Calvin Coolidge. Obregón was eager to resolve issues with the U.S., including petroleum, in order to secure diplomatic recognition from the U.S. Negotiations over oil resulted in the Bucareli Treaty in 1923.
When revolutionary general Plutarco Elías Calles succeeded Obregón in 1924, he repudiated the Bucareli Treaty. Relations between the Calles government and the U.S. deteriorated further. In 1926, Calles implemented articles of the Mexican Constitution of 1917 that gave the state the power to suppress the role of the Roman Catholic Church in Mexico. A major civil uprising broke out, known as the Cristero War. The turmoil in Mexico prompted the U.S. government to replace its ambassador, appointing a Wall Street banker, Dwight W. Morrow to the post. Morrow played a key role in brokering an agreement between the Roman Catholic hierarchy and the Mexican government which ended the conflict in 1929. Morrow created a great deal of good will in Mexico by replacing the sign at the embassy to read "Embassy of the United States of America" rather than "American Embassy." He also commissioned Diego Rivera to paint murals at the palace of Hernán Cortés in Cuernavaca, Morelos, that depicted Mexican history.
During the presidency of revolutionary general Lázaro Cárdenas del Río, the controversy over petroleum again flared. Standard Oil had major investments in Mexico and a dispute between the oil workers and the company was to be resolved via the Mexican court system. The dispute, however, escalated, and on March 18, 1938, President Cárdenas used constitutional powers to expropriate foreign oil interests in Mexico and created the government-owned Petroleos Mexicanos or PEMEX. Although the United States has had a long history of interventions in Latin America, the expropriation did not result in that. U.S. President Franklin D. Roosevelt was implementing the Good Neighbor Policy, in which the U.S. eschewed the role of intervention and courted better relations with the region, which would be vital if another major conflict broke out in Europe. However, with the Great Depression, the United States implemented a program of expelling Mexicans from the U.S. in what was known as Mexican Repatriation.
Under President Cárdenas, Mexico in 1934-40 expropriated three million acres of agricultural land owned by 300 Americans. Its worth was a matter of debate: between $19 million and $102 million, but nothing was paid. Roosevelt settled the matter in 1938 quietly. He refused to aggressively intervene in Mexican agrarian disputes in order not to disrupt trade. He was sympathetic to Mexican president Cárdenas's agrarian reform program, as was ambassador Josephus Daniels. On the other hand, Secretary of State Cordell Hull was antagonistic.

### World War II

When the U.S. did enter World War II, it negotiated an agreement with Mexican President Manuel Avila Camacho to be allies in the conflict against the Axis powers. The U.S. bought Mexican metals, especially copper and silver, but also importantly implemented a labor agreement with Mexico, known as the Bracero Program. Mexican agricultural workers were brought under contract to the U.S. to do mainly agricultural labor as well as harvesting timber in the northwest. The program continued in effect until 1964 when organized labor in the U.S. pushed for ending it. In 1940 Roosevelt appointed Nelson Rockefeller to head the new, well-funded Office of the Coordinator of Inter-American Affairs. Anti-fascist propaganda was a major project across Latin America, and was run by Rockefeller's office. It spent millions on radio broadcasts and motion pictures, hoping to reach a large audience. In addition to propaganda, large sums were allocated for economic support and development. Madison Avenue techniques generated a push back in Mexico, especially where well-informed locals resisted heavy-handed American influence. Mexico was a valuable ally in the war; many of the long-standing disputes about oil were resolved and relations were the warmest in history. The usually strident anti-American voices on the far Left were quiet because the U.S. and USSR were allies. After years of debate, Mexico sent a small air unit into the war in the Pacific. An arrangement was made whereby 250,000 Mexican citizens living in the United States served in the American forces; over 1000 were killed in combat.