Of all our country’s “forgotten wars,” there are none as important to the shaping of the United States as the Mexican-American War of 1846-1848. At the time it was our most divisive war, and many Americans, including many of the officers and enlisted men who fought in the war, considered it to be, in the words of Ulysses S. Grant’s memoirs, “…one of the most unjust ever waged by a strong against a weaker nation.”

But it was perhaps the most successful of all American wars. As Grant also wrote in his memoirs, “The men engaged in the Mexican War were brave, and the officers of the regular army, from highest to lowest, were educated in their profession. A more efficient army of its number and armament I do not believe every fought a battle.” At the end of the war, the United States was 1.2 million square miles larger than it had been before the war, and the victorious United States Army was perhaps the most confident, and experienced, fighting force of its time.

This may well have been a tragedy for America, because the officers who served together and learned and honed their military skills together in Mexico ended up fighting each other with deadly efficiency in the Civil War. Among the Civil War generals who served as lieutenants and captains in Mexico were George Mead, James “Pete” Longstreet, Thomas Jackson (not yet nicknamed “Stonewall”), George Pickett, William Tecumseh Sherman, George McClellan, P. G. T. Beauregard, Braxton Bragg, Ulysses S. Grant—and Robert E. Lee.

Usually, when we think of Robert E. Lee we picture a dignified white-bearded figure, a gray-clad general on a white horse commanding a large conventional army. But that is a picture of General Lee in the Civil War. In the Mexican War, Robert E. Lee was a forty-year-old captain in what was then considered the elite branch of the Army—the Corps of Engineers—and instead of his later white beard, he wore a roguish dark mustache. His father, Henry “Light Horse Harry” Lee had been one of the most famous military commanders of the Revolutionary War, but something of a failure in civilian life.

Robert E. Lee. Photo courtesy of biography.com.

Robert Lee had hardly known his father, but his father had left him quite a military legacy, and he had already begun to make his own reputation when he graduated second in his class from the United States Military Academy without having received even one demerit in the process—a record that is said to be still unbroken. Lee had enjoyed an excellent reputation since his cadet days. He quickly established himself as a military engineer with expertise in fortifications, road and bridge building, artillery emplacement, surveying, and cartography.

He had also shown a good hand at civil engineering, having once helped adjust the Mississippi River to bring it back to its original course somewhat closer to St. Louis. Strangely, Lee did not made rank quite as fast as many of his peers. But as a lieutenant he had made an excellent impression on the Army’s most senior officer, Major General Winfield Scott (aka “Old Fuss ‘n Feathers”). Shortly after arriving in Mexico, Robert E. Lee did such a stellar job running dangerous and crucial reconnaissance missions for General John Wool prior to and during the battle of Buena Vista that when he was preparing to capture the historic Atlantic port city of Vera Cruz, General Scott had Captain Lee assigned to his staff.

On the 7th of March, 1847, in a move that would now seem downright irresponsible (if admirable), General Scott insisted on a firsthand look at the beaches where the Navy proposed to land his troops. With the commander of the naval landing force, Commodore Donald Conner, General Scott set out in a small ship to sail close to shore for a visual recon. Along with him, General Scott took a few of his best staff officers, including Joseph E. Johnson, P.G.T Beauregard, and the two future commanders of opposing armies at Gettysburg, George Meade and Robert E. Lee. The ship came under dangerously close fire from Mexican positions ashore, and while Lee’s thoughts on the matter are unknown, George Meade wrote home that one shot hitting the ship could have ended the whole expedition. This short shipboard jaunt was not Robert E. Lee’s first reconnaissance mission in Mexico, and it wouldn’t be his last.

The landings were successful, and a combined siege and artillery battle followed. Once again, Lee found himself working with the Navy. General Scott was short of heavy artillery ashore, and Commodore Conner agreed to lend him six of his heaviest guns—weighing 6,300 lbs each—but he also specified that Navy gunners accompany and man the guns. Captain Lee was given the mission of covertly moving the terribly cumbersome guns, their equally heavy loads of shot and powder, and their Navy gun crews across exposed sands and over and through thick chaparral to a position that had been surveyed and selected on an earlier reconnaissance. Lee supervised the emplacement of the guns, and then turned command over to a Navy gunnery officer and returned to his staff duties. This arduous feat was accomplished without alerting nearby Mexican forces, who remained unaware of the guns until those guns most devastatingly joined in the fight.

The battle of Vera Cruz ended with a Mexican surrender on April 4, 1847, and now General Scott had to move his army many miles inland, through very rugged terrain and mountains, toward Mexico City. Scott had a choice of two roads, or maybe “routes” would be a better word. These were the Orizaba Road and the National Road used by Cortes in 1519. Though there is no record that I am aware of, it is very likely that Captain Lee was involved in ascertaining that the National Road was in better condition than the Orizaba Road. But “better condition” was still far from good condition. Scott’s army was severely lacking in transportation assets—both draft animals and wagons. He was forced to leave much of his army at Vera Cruz for the time being, to be moved up when transportation was more available. With a division under Levi Twiggs, USMC, leading the way, the Americans set out on the National Road, many of them probably experiencing the same mix of anxiety and excitement that moved the Spaniards 328 years earlier.

Antonio Lopez de Santa Anna—infamous for his 1836 invasion of Texas, the Battle of the Alamo, the massacre at Goliad, and his utter defeat at San Jacinto—was reviled by many Mexicans and deeply hated by just about all Texans, whether Tejano, Texian, or Comanche. He’d had his ups and his downs, and now he was once again in command of Mexican soldiers. Santa Anna was a vain and egotistical man, but not entirely a fool. He knew that Scott and his army would be headed for the capital, and he rightly figured that Scott would choose the National Road. Santa Anna had a ranch near Jalapa, not far from the National Road, and he knew the area and its terrain well. He decided to make his stand and stop the Americans near the town of Cerro Gordo.

Antonio López de Santa Anna. Image courtesy of sanjacinto-museum.org

Santa Anna had all the advantages of terrain, preparation, and numbers, but Scott had a better army, and he had Robert E. Lee. Again, Lee was tasked with both reconnaissance and engineering. On one recon mission, he was forced to hide under a fallen tree next to a spring and remain still and silent while, feet away, Mexican troops filled their canteens. Lee discovered that Santa Anna had such confidence in the extremely rugged terrain and tangled vegetation on his left flank that he had not guarded this area well.

Lee found a promising path through a ravine. The next day, he led a work party to the area, and while supervising the building of what Vietnam War recon troops called a “high-speed trail,” he continued to reconnoiter the way ahead. When the fighting began in earnest, Lee led American troops in an assault on Mexican positions atop a hill called Atalaya, drove them from their positions, then supervised the deployment of cannons on the hill. A day later, he took advantage of what he had learned on his reconnaissance patrol, and led American soldiers around the mountain to the Jalapa Road to establish a blocking force to cut off the Mexican retreat. According to at least one source, Lee found a wounded Mexican drummer boy trapped there beneath the body of a dying man. He had the two wounded Mexicans sent back to the rear for medical treatment, then proceeded to lead his men in breaking through a Mexican artillery battery to reach the Jalapa Road.

In his official post-battle report, Winfield Scott wrote that he was “compelled to make special mention of Capt. R. E. Lee, Engineers. This officer greatly distinguished himself at the siege of Vera Cruz; was again indefatigable during these operations in reconnaissance, as daring as laborious, and of the utmost value. Nor was he less conspicuous in planning batteries and in conducting columns to their stations.”

This was in an era before the United States had much, if any, of a formal system of awards and decorations, but it is not hard to imagine that medals would have come Lee’s way had there been such a system.

In August 1847, the U.S. Army arrived at a small village by the name of San Agustin on the outskirts of Mexico City. Again, General Scott had to decide which of the possible roads would offer the least resistance to an American advance, and again he put his trust in Robert E. Lee. Lee discovered that the best route was a trail along the edge of three-mile wide and supposedly impassable lava bed called El Pedregal. A work party was sent to widen the trail into a road passable for gun caissons and wagons, and while directing the work party, Lee also found himself skirmishing with Mexican Gabriel Valencia’s troops camped west of El Pedregal.

Op-Ed: Lawmakers target Confederate monuments at West Point and the Naval Academy. They’re wrong to do so.

Read Next: Op-Ed: Lawmakers target Confederate monuments at West Point and the Naval Academy. They’re wrong to do so.

Lee’s work party was then reinforced by the arrival of Persifor Smith’s troops, who had already delayed one planned attack on General Valencia’s forces, and now only needed permission from General Scott before initiating the attack. Lee volunteered to take a message back to General Scott. When night fell, Lee and a handful of men slipped away into the dark and began to make their way across El Pedregal’s wide and treacherous lava bed. The night turned stormy and the only visual references were revealed in flashes of lightning.

Lee had an excellent sense of direction, but this was an exceedingly difficult task of land navigation. Lee and his companions finally made it across the lava beds to the place where they had expected to find General Scott, only to discover that General Scott had returned to his previous headquarters at San Agustin. Lee was on the verge of exhaustion, but he “Rangered up,” walked the remaining miles, and found General Scott back at San Agustin, still awake and writing reports. Scott was glad to hear Lee’s report, and then sent the now-exhausted Lee and Levi Twiggs off to round up additional troops from the brigade of future president Franklin Pierce. Somehow Lee found the reserves of spirit and physical strength needed to take General Scott’s permission to attack back across Le Pedregal to Smith, and then to lead Pierce’s troops into position for a diversionary attack.

The resulting battle of Padierna/Contreras was a major victory for the U.S., and Robert E. Lee’s part in it was honored. Winfield Scott awarded him a brevet promotion to lieutenant colonel, and called his actions at El Pedregal, “The greatest feat of physical and moral courage performed by any individual, in my knowledge, pending the campaign.”

During the course of the rest of the Mexican-American War, including the final capture of Mexico City, Robert E. Lee performed still more reconnaissance missions, and continued to show his talent in the surveying and construction of artillery emplacements. Much of the detail of Lee’s recon missions and other activities is lost, but what remains is an amazing history of military accomplishment. Although there are many similarities between reconnaissance missions in the 1840s and reconnaissance missions in the 20th and 21st centuries, there are also many differences. Of course, the equipment differs more than the required skill set does, and though we can only surmise what weapons and other equipment were available to Lee, it is clear that he had the skills, determination, courage, patient endurance, good luck, and curiosity of a man born to run recon.

If the Mexican-American War was as well remembered as the other major American wars of our country’s first hundred years, Robert E. Lee would be an even larger historical figure than he is now. One of the most admirable Anglo-Saxon culture traits is the post-war respect shown to certain former enemies. As a boy growing up in the 1950s and ’60s, I would often see television shows and movies about the Crusades that presented the Kurdish leader, Saladin the Great, as an honorable foe. From the Indian Wars—which I hope will forever be our final American civil war—we honor Crazy Horse, Gall, Sitting Bull, Chief Joseph, and many others.

From World War One there is the Turkish leader, Ataturk, whose troops at Gallipoli fought with skill, courage, and honor, and who, after the war, reassured the families of the British Empire forces who had fought against Turkey in that campaign that their sons and brothers and fathers who died fighting against Turkish soldiers are now as honored by their old foes as those sons of Turkey they fought against. From World War Two we have Erwin Rommel. And for 150 years, Americans, north and south, have held Robert E. Lee in high esteem.

Robert E. Lee was not a perfect man. He blundered tragically in ordering the fiasco remembered as Pickett’s Charge. The gallant legacy of his Army of Northern Virginia is tarnished by the fact that—probably without Lee’s permission or even his knowledge—some units are reliably reported to have seized free people and forced them into slavery. And the charismatic battle flag under which the Army of Northern Virginia and the Army of Tennessee endured so much and fought so valiantly has too often been insulted and disgraced by those who use that flag as an emblem of racism and racial intimidation.

And though it was common for Virginian gentlemen of Robert E. Lee’s time to invest their primary patriotism in their state, not in the union of the states, Lee and his men would have been put to better use and would have been better supported if he had accepted Abraham Lincoln’s offer of command (it was old Winfield Scott who recommended Lee to Lincoln) instead of deciding to go to work for the likes of Jefferson Davis and Alexander Stephens in service of a very bad cause.

We can not fairly impose the standards and values of the present on people who lived in the past. Though he was no fan of slavery and was apparently never at ease with his position as “owner” of the slaves his wife had brought to their marriage, and despite the fact that during the Civil War, Lee had vainly petitioned a Richmond government run primarily by the lords of vast plantations and owners of thousands of slaves to emancipate and enlist black soldiers and promise their families freedom, the hard historical fact remains that Robert E. Lee’s admirable character and talents were employed on behalf of a slave state.

But at his surrender at Appomattox Court House, Lee’s concern was not for himself and his officers, but rather for the soldiers who had suffered and accomplished and lost so much under his command. Robert E. Lee went on to devote a great part of his post-war energies to encouraging his former soldiers to put the Confederate past behind them, and to be productive and patriotic citizens of the United States of America. He deserves to be remembered with respect, even by Americans who loathe the causes he fought for in the American Civil War and in the Mexican-American War.

It is a truism that may not apply well to our current wars against fanatical terrorist death cults, but does apply to every other war our country has fought: In war, good people often end up fighting for the bad side, and bad people often fight for the good side. And the soldiers who do the fighting often have more in common with those they fight against than they do with the people who arrange the wars for them.

As another Confederate veteran and U.S. Army Ranger Hall of Fame member John Singleton Mosby said, “It is a great error to hold a soldier responsible for the merits of a cause in which he happens to fight.”

Come to think of it, how come Robert E. Lee isn’t in the Ranger Hall of Fame?