For almost twenty years, the highest-ranking general in the United States Army was secretly on the payroll of Spain, and it wasn't proven until long after he was dead.
His name was James Wilkinson.
He'd been an officer in the Revolution, and even then he had a talent for being near trouble. He was tangled up in the Conway Cabal, the whispering campaign to replace George Washington with Horatio Gates. Later he was forced out of a job as clothier general over sloppy accounts. Somehow, none of it ever stuck.
In 1787, Wilkinson made a trip down the Mississippi to New Orleans, which was Spanish territory at the time. Americans living in Kentucky depended on the river to get their goods to market, and Spain controlled it. Wilkinson came back with valuable trading rights.
What nobody knew was the price. While in New Orleans, he swore an oath of allegiance to the King of Spain. In Spanish reports he became known as Agent 13. In exchange for a pension, he fed Spain information and promised to help pull the western territories away from the United States.
Then he went back into the U.S. Army.
He rose all the way to the top. By the late 1790s he was the senior officer in the entire Army, and he held that role on and off until 1812. All the while, money from Spain kept coming, sometimes smuggled up the river in barrels of sugar or coffee.
There were rumors the whole time. People in Washington whispered that Wilkinson was a Spanish agent. Presidents heard the talk. Nobody could prove it.
In 1804, when Lewis and Clark set out to explore the West, Wilkinson quietly advised Spanish officials to stop them. Spain sent out patrols to intercept the expedition. They never found it.
Then came Aaron Burr.
After killing Alexander Hamilton in a duel, the former vice president headed west with a mysterious plan. Depending on who you ask, he wanted to invade Spanish Mexico, carve off part of the American West, or both. Wilkinson was deep in it with him.
Then Wilkinson decided Burr was going to fail. So he flipped. He wrote to Thomas Jefferson warning of a dangerous conspiracy and cast himself as the loyal general saving the nation.
The key evidence against Burr was a coded letter Burr had sent to Wilkinson. Before handing it over, Wilkinson changed it, cutting out the parts that made himself look guilty.
At Burr's treason trial in 1807, Wilkinson was the star witness. It went badly. The doctored letter came out. The grand jury came close to indicting Wilkinson himself. The foreman, John Randolph, later described him as rotten from top to bottom. Burr was acquitted, and Wilkinson kept his command.
He faced courts of inquiry and a court-martial over the years. He beat every one of them. It was later said of him that he never won a battle and never lost a court-martial.
His luck on the battlefield finally ran out in the War of 1812. In 1813 he led an invasion aimed at Montreal that fell apart in confusion and defeat. He was removed from command.
Wilkinson died in Mexico City in 1825.
It wasn't until historians dug through the Spanish archives decades later that they found the proof. The reports, the payments, the code name. The man who led the U.S. Army had been working for a foreign power the whole time.
It's called the Wilkinson affair, and almost nobody learns about it.