Two years into the Revolutionary War, as the Americans hunted for any advantage in their war for independence, they cultivated a daring young Spaniard as an ally: the governor of Louisiana, Bernardo de Galvez.

In April 1777, George Morgan, the commander at Pittsburgh’s Fort Pitt, sent a flotilla down the Ohio and Mississippi rivers to New Orleans carrying a letter to Galvez, offering to trade with Spain and asking for aid in case the Americans decided to attack the British in Florida. The American ships sailed back up the Mississippi River that August filled with ammunition, arms, and provisions. “I will extend…whatever assistance I can,” Galvez responded, “but it must appear that I am ignorant of it all.”

First by stealth, then by open warfare, Galvez became a key ally of the American Revolution. But he’s been long forgotten, eclipsed by the Marquis de Lafayette and other foreign friends of America.

For eight years, Galvez served as governor of Spanish Louisiana, the vast territory acquired from France in 1762, which reached from the Mississippi River west to the Rocky Mountains and from New Orleans north into present-day Canada. Galvez allowed shipments of weapons, medicine and fabric for military uniforms to be sent to the Continental Army via the Mississippi. In 1779, when Spain declared war on England, Galvez attacked British West Florida, winning it back for his king and indirectly benefiting the Americans by forcing the British to fight on two fronts.

Yet Galvez was no revolutionary. He wasn’t helping the Americans out of sympathy for their cause. Siding with the Americans advanced the interests of the King of Spain, England’s longtime rival, in a worldwide great-power conflict. Because of that, American history takes less note of his strategic alliance. It took until 2014 for Galvez to get official recognition from the United States, when he was named an honorary U.S. citizen by Congress.

Born in 1746, Galvez joined the Spanish military as a teen. He moved quickly up the ranks thanks to the influence of his father, who served as a general stationed in Central America, and his uncle, a royal minister. A career soldier, he served in the 1762 war against Portugal, fought the Apache in Mexico in 1770 and was wounded in Spain’s failed 1775 invasion of Algiers. Dispatched to New Orleans as a colonel in June 1776, Galvez was appointed governor of Louisiana on New Year’s Day 1777 at age 30. His youthful boldness and his marriage to a Creole beauty, Felicie de St. Maxent d’Estrehan, charmed the colonists.

When Galvez aided the Americans at Fort Pitt, he wasn’t acting alone, but the under command of his king. Just two months into his governorship, Galvez received an unusual note from Spain’s King Carlos III, ordering him to admit, duty-free, 300 muskets with bayonets, 100 barrels of gunpowder, plus cloth and medicine. The supplies were destined for America’s Continental Army, but the king warned Galvez to keep his distance from the transaction “so that England could never argue that Spain had aided her insurgent foes.”

The calculated subterfuge was meant to preserve Spain’s official neutrality in the American Revolution while weakening England, Spain’s longtime rival. But the ruse was not quite subtle enough. In March 1777, Gov. Peter Chester of British West Florida – which extended west to the Mississippi River at Baton Rouge -- protested that ships filled with arms and ammo were sailing up the river under Spanish flags. Galvez replied he was just being hospitable.

For the next two years, the Americans worked hard to cultivate their semi-secret ally. Patrick Henry, Virginia’s governor, wrote Galvez repeatedly, offering to trade “Hemp, Flax, Skins, Furrs, Beef, [and] Pork” with Spain and promising commerce, friendship and gratitude in exchange for military supplies and a loan of 150,000 gold coins. Galvez continued to allow supplies to move up the Mississippi to Pennsylvania—an important back door to the battlefront, since the British had blockaded East Coast ports.

Quietly, Galvez worked with Oliver Pollock, the Continental Congress’ agent in New Orleans, now known as the “financier of the Revolution in the West.” Pollock was an Irish merchant whose loyalty to his home country had inspired him to fight the English in any way possible. Galvez secretly helped him bankroll George Rogers Clark’s band of frontiersmen, who took Fort Sackville in Illinois from the British in 1778. After another Pollock-financed American, James Willing, raided British forts and loyalists’ homes in West Florida, Galvez declared Willing and his men refugees and allowed them to sell some of their plunder, including stolen slaves, and buy weapons in New Orleans.

After Spain declared war on England in summer 1779, Galvez, figuring that a good offense is the best defense, set out on his victorious military tour. He mustered an army of Creoles, free blacks, and Native Americans to march with his Spanish regulars. With 667 men, Galvez routed the British from their forts in the Mississippi Valley, including Baton Rouge and Natchez. In March 1780, he besieged Mobile and seized it after a four-day battle.

An October 1780 hurricane scattered Galvez’s fleet and delayed his plans to attack Pensacola, England’s remaining outpost in Florida. Six months later, Galvez launched his offensive. His bold risk-taking led to a breakthrough. When a Spanish naval commander proved reluctant to expose his fleet to British fire by sailing into Pensacola Bay, Galvez went forward without him. “The ship entered the port without the least damage, not withstanding the great number of bullets that pierced the sails and shrouds,” reads a Spanish battle journal often attributed to Galvez himself, “and, with the tremendous applause of the Army who, with continuous ‘VIVAS,’ demonstrated to the General their delight and affection for him.”

The Spanish besieged Pensacola for two months. When they blew up a British powder magazine in May 1781, killing about 100 soldiers, the enemy surrendered. The English left Florida, never to return.

The United States’ founding leaders recognized Galvez as an ally, though with less effusive praise than they bestowed on foreign volunteers such as Lafayette or Tadeusz Kosciuszko. The Continental Congress’ commerce committee wrote Galvez in 1777 to thank him for protecting American trade on the Mississippi. When George Washington learned of Galvez’s victories at Baton Rouge and Natchez, he wrote to Spain’s informal ambassador at Philadelphia that “they will probably have a beneficial influence on the affairs of the southern States.”

Galvez’s victory at Pensacola did much more than that. It not only removed the British threat to the newly born United States from the south, it deprived the British of troops they could have deployed to battle the Americans at the war’s final battle at Yorktown later in 1781. Spain’s new command of the Gulf of Mexico also allowed France to deploy all its naval forces against the British during the battles of the Chesapeake and Yorktown. The Spanish even sent four ships to Haiti to guard Cap Francois, the French port now known as Cap Haitien, so that French ships could sail north and join the Revolution’s decisive battles.

After the war, Carlos III showered Galvez with honors. He gave Galvez permission to use the phrase “Yo Solo,” or “I Alone,” on his coat of arms, in “memory of the heroic action in which you alone forced the entrance of the bay.” In 1785, he named Galvez to succeed his late father as viceroy of New Spain. Galvez governed Spain’s American possessions for only a year and a half; he died of yellow fever in Mexico City in November 1786 at age 40.

Spain ceded Louisiana to France in an 1801 treaty, but Napoleon sold it to the United States in 1803, doubling the new nation’s size. The Spanish ceded Florida to the U.S. in 1821.

Most American historians took little note of Galvez. Unlike Lafayette or Kosciuszko, he wasn’t inspired to volunteer by a revolutionary spirit, and he didn’t fight on the soil of the original 13 colonies. What’s more, getting assistance from a monarchist serving his king didn’t fit the patriotic narrative of the American Revolution.

“The creation myth that America bootstrapped itself from colony to nation, that it fought the war and gained independence all by itself, was never correct and was never a good fit,” argues Larrie D. Ferreiro in his new book, Brothers at Arms: American Independence and the Men of France and Spain Who Saved It. “The real story is that the American nation was born as the centerpiece of an international coalition, which together worked to defeat a common adversary.”

In time, Galvez has gotten his due. In the 1820s, Mexico named Galveston, Texas, after him. And on December 16, 2014, President Obama signed the congressional resolution that named Galvez an honorary U.S. citizen, an honor given only to eight foreign nationals, including wartime allies Lafayette and Winston Churchill. The resolution called Galvez a hero of the Revolutionary War “who risked his life for the freedom of the United States.” Few may remember him, but the legacy of one of the Revolutionary War’s most dashing, daring allies endures.