American historian Michael Hogan makes a bold claim. He says that Abraham Lincoln is in no small part responsible for the United States being blessed for many generations with an essentially friendly nation to the south—this despite a history that includes the United States annexation and conquest of Mexican territory from Texas to California in the 1840s, and the nations’ chronic border and immigration tensions. “Lincoln is revered in Mexico,” Hogan says. As evidence, he points to the commemorative statues of Lincoln in four major Mexican cities. The one in Tijuana towers over the city's grand boulevard, Paseo de los Héroes, while Mexico City's Parque Lincoln features a replica of sculptor Augustus Saint-Gardens' much admired Standing Lincoln, identical to the one in London's Parliament Square. (The original stands in Lincoln Park in Chicago.) These are commanding monuments, especially for a foreign leader.

In his 2016 study, Abraham Lincoln and Mexico: A History of Courage, Intrigue and Unlikely Friendships, Hogan points to several factors that elevated the United States’ 16th president in the eyes of Mexicans, in particular Lincoln’s courageous stand in Congress against the Mexican War, and his later support in the 1860s for democratic reformist Benito Juárez, who has at times been called the “Abraham Lincoln of Mexico.” Lincoln’s stature as a force for political equality and economic opportunity—and his opposition to slavery, which Mexico had abolished in 1829—made the American leader a sympathetic figure to the progressive followers of Juárez, who was inaugurated as president of Mexico in the same month and year, March 1861, as Lincoln.

“Both were born very poor, pulled themselves up by their bootstraps, became lawyers, and ultimately reached the highest office of their countries,” says Hogan in a telephone interview from Guadalajara, where he has lived for more than a quarter-century. “Both worked for the freedom of oppressed peoples—Lincoln demolishing slavery while Juárez helped raise Mexican workers out of agrarian peonage.” (In a lighter vein, Hogan points out that physically, they were opposites: While the gangly Lincoln stood six-foot-four, Juárez reversed those numbers, at a stocky four-foot-six.)

Early on in Lincoln’s political career, as a freshman Whig congressman from Illinois, he condemned the 1846 U.S. invasion of Mexico, bucking the prevailing patriotic tide and accusing President James K. Polk of promoting a falsehood to justify war. After a skirmish of troops in an area of what is now south Texas, but was then disputed territory, Polk declared that "American blood has been shed on American soil” and that therefore “a state of war” existed with Mexico. “Show me the spot where American blood was shed,” Lincoln famously challenged, introducing the first of eight “Spot resolutions” questioning the constitutionality of the war. Lincoln’s stand proved unpopular with his constitutents—he became known as “Spotty Lincoln”—and he did not seek re-election.

He was not alone in his protest, however. Among others, New Englanders such as John Quincy Adams, who lost a son in the war, and Henry David Thoreau, who wrote his famed essay, “On Civil Disobedience,” in reaction to the war, also dissented. Ulysses S. Grant, who distinguished himself as an officer serving in Mexico, later wrote in his memoirs that it had been “the most unjust war ever waged against a weaker nation by a stronger.”

In seizing more than half of Mexico’s territory as the spoils of war, the U.S. increased its territory by more than 750,000 square miles, which accelerated tensions over the expansion of slavery that culminated in the carnage of the American Civil War. Hogan believes strongly that the long-term economic impact on Mexico should inform thinking about border politics and immigration today, “We conveniently forget that the causes of northward migration have their origins,” he writes, “in the seizure of Mexico’s main ports to the west (San Diego, San Francisco, Los Angeles), the loss of the rich silver mines of Nevada, the gold and fertile lands of California, and the mighty rivers and lakes which provide clean water to the entire southwest.”

In the course of researching his Lincoln book, Hogan made an important discovery in the archives of the Banco Nacional de México: the journals of Matías Romero, a future Mexican Treasury Secretary, who, as a young diplomat before and during the American Civil War, represented the Juárez government in Washington.

Romero had written a congratulatory letter to Lincoln after the 1860 election, to which the president-elect cordially thanked Romero, replying: “While, as yet I can do no official act on behalf of the United States, as one of its citizens I tender the expression of my sincere wishes for the happiness, prosperity and liberty of yourself, your government, and its people.”

Those fine hopes were about to be tested as never before, in both countries.

During its own civil war of the late 1850s, Mexico had accrued significant foreign debt, which the French Emperor Napoleon III ultimately used as pretext to expand his colonial empire, installing an Austrian archduke, Ferdinand Maximilian, as Emperor Maximilian I of Mexico in 1863. The United States did not recognize the French regime in Mexico, but with the Civil War raging, remained officially neutral in the hope that France would not recognize or aid the Confederacy.

Nevertheless, the resourceful Romero, then in his mid-20s, found ways to secure American aid in spite of official policy, mainly by establishing a personal relationship with President Lincoln and the First Lady, Mary Todd Lincoln. From there, Romero was able to befriend Union generals Grant and Philip Sheridan, connections that would later prove crucial to the Mexican struggle. “What particularly endeared Romero to the American president,” Hogan notes, “was that he escorted Mrs. Lincoln on her frequent shopping trips…with good-natured grace. It was a duty which Lincoln was happy to relinquish.”

With Lincoln’s earlier letter in hand,Romero made the rounds with American bankers in San Francisco, New York and Boston, Hogan says, selling bonds that raised $18 million to fund the Mexican army. “They bought cannon, uniforms, shoes, food, salaries for the men, all kinds of things,” he says. “And Grant later helped them secure even better weapons—Springfield rifles. He would go to the Springfield people and say, “Get them some decent rifles. I don’t want them fighting the French with the old-fashioned ones.”

After the Civil War, the U.S. became even more helpful in the fight for Mexican liberation. In a show of support, Grant dispatched 50,000 men to the Texas border under General Sheridan, instructing him to covertly “lose” 30,000 rifles where they could be miraculously “found” by the Mexicans. Sheridan’s forces included several regiments of seasoned African-American troops, many of whom went on to fight in the Indian Wars, where they were nicknamed the Buffalo Soldiers.

By 1867, the French had withdrawn their occupying army; the Juárez forces captured and executed Maximilian, and the Mexican Republic was restored. Though Lincoln didn’t live to see it, his Mexican counterpart had also triumphed in a war for the survival of his nation. “Lincoln really loved the Mexican people and he saw the future as us being allied in cultural ways, and also in business ways,” Hogan reflects. “He supported the growth of the railroads in Mexico, as did Grant, who was a big investor in the railroads, and he saw us as being much more united than we are.”

Though most of this history has receded in the national memories of both countries, Hogan believes that Lincoln’s principled leadership and friendship—outspoken in the 1840s, tacit in the 1860s—created a pathway for mutually respectful relations well into the future.