In March 1836, Mexican forces overran the Alamo in San Antonio, Texas, achieving victory over those who had declared Texas’ independence from Mexico just a few weeks earlier. Although nearly everyone at the Alamo was killed or captured, Texas achieved independence when Sam Houston won an unlikely victory at the Battle of San Jacinto the following month.

Mexico, which had easily won victory at the Alamo, soon faced an America that had annexed Texas and was becoming a major player on the world stage. How did once-dominant Mexico lose the Mexican-American War?

Mexico Was Essentially Broke

The country was racked by financial instability as the war began in 1846. America’s blockade of Mexican ports worsened an already difficult situation, as Mexico couldn’t import and export goods, or levy taxes on imports. Financial and political stability was non-existent, and the presidency of Mexico changed hands several times during the war.

And while they were fighting the Americans, they were also trying to suppress a series of internal rebellions that were further draining resources. Financially, Mexico was essentially fighting with both hands behind its back.

Americans Had Better Weapons

Many of Mexico’s troops were outfitted with weapons that were nearly 30 years old. The country was forced to purchase old guns and ammunition in bulk from France, which had been used during the Napoleonic Wars of the early 19th century.

As Peter Guardino, author of The Dead March: A History of the Mexican-American War, notes, American troops that captured these weapons were often shocked by just how outdated they were.

Those American troops were supplied with the most modern of weapons. Some of these new technologies played a deciding factor in several key battles. New, mobile horse artillery units, known as “flying artillery,” meant that American cavalry units could be more quickly and efficiently deployed during battle.

By comparison, Mexico was so financially strapped that it often didn’t own the horses it needed for cavalry maneuvers or to move troops. Instead, they resorted to renting horses from campaign to campaign, rather than pay for their continual upkeep.

Mexico Could Barely Afford to Feed Its Soldiers

Desertion among the Mexican ranks was rampant, as the government struggled to pay or even feed its troops. This had a devastating impact on Mexican military strategy.

“The principal concern they always have is ‘We have to fight this thing while we still have food, and we have to try to gain some tactical advantage,’” Guardino says.

This meant that Mexico was often unable to follow up on initial victories. “Mexican generals made some mistakes, but American generals made mistakes too,” Guardino says. “But the Mexican general’s mistakes were always fatal, because when you’re on the margin, it turns a defeat into a disaster.”

This played out most desperately for Mexico at the Battle of Buena Vista in February 1847. Despite having nearly three times as many troops, Mexico was defeated. According to Guardino, it could have easily gone the other way. “On the last day of the battle, when the Mexicans have lost, the Americans are very relieved, they didn’t think they could survive a third day.”

America was ready to expand westward, even if it meant going to war. Learn how and why the Mexican-American War happened.

Many American Officers Were Better Trained

Generals Winfield Scott and future president Zachary Taylor were highly skilled military strategists. Taylor became a national hero for his valor at Buena Vista, which earned him the nickname “Old Rough and Ready.”

General Santa Anna (who also served several stints as president during the war) has been largely criticized for his decision-making skills. As Guardino says, “Tactically, he was not a genius, although he thought he was smarter than he was. But he also wasn’t as stupid as people thought he was. He was probably about average for a 19th-century general.”

The Mexican Army also suffered from rampant infighting between generals and politicians, who disagreed over the course of the war.

The Mexican-American War also marked the military debut of a legendary group of West Point-trained junior officers who would go on to make their mark in the U.S. Civil War, including Robert E. Lee, Ulysses S. Grant, ‘Stonewall’ Jackson and others.

Ultimately, Mexico Had to Petition for Peace

Mexican casualties in the Mexican-American War are estimated to be at least 25,000 killed or wounded. Mexico was forced to petition for peace, and the Treaty of Guadalupe Hidalgo ending the war was signed in February 1848.

Ending the war would allow Mexico to deal with internal issues. It also helped solve its financial crisis, as the United States paid $15 million to Mexico ($420 million today).

But, under the treaty, Mexico lost a full third of its territory, including nearly all of present-day California, Utah, Nevada, Arizona and New Mexico.