The British General Lord Charles Cornwallis and his army on October 19, 1781, surrendered to General George Washington’s American force and its French allies at the Battle of Yorktown.

According to the Washington Library, that marked the conclusion of the last major battle of the American Revolution ushering serious negotiations that ended in recognition of American independence at the Peace of Paris, birthing a new country that would eventually become the most powerful in the world.

The surrender cemented Washington’s status and fame grew to international proportions, interrupting his much-desired Mount Vernon retirement with greater calls to public service.

The victory described as improbable wouldn’t have been possible but for the patriotic service of James Armistead Lafayette.

Armistead was born into slavery around December 10, 1748, to owner William Armistead in New Kent, Virginia.

Instrumental during the American Revolution, with his impeccable double spy ability, Lafayette intelligence ended the Battle of Yorktown, consequently gaining America independence.

According to Biography.com, Armistead volunteered to join the U.S. Army to fight for America’s freedom. He did that as a slave.

After his master granted him permission to join the U.S. Army and the revolutionary cause, Armistead was stationed to serve the Marquis de Lafayette, the commander of allied French forces.

Slaves were allowed to fight on either side of the war with freedom as an incentive for their service at the time Armistead enrolled.

It was reported that Lafayette never took up arms in the war. Instead, he infiltrated the British Army led by Cornwallis and fed the Americans with information on the former’s plans and thinking. He adopted the last name of his commanding officer Marquis de Lafayette.

Armistead did just that but as a double spy – spying on the Americans for the British and vice versa.

“Lafayette employed Armistead as a spy, with the hopes of gathering intelligence in regards to enemy movements. Posing as a runaway slave hired by the British to spy on the Americans, Armistead successfully infiltrated British General Charles Cornwallis’ headquarters.

The Marquis de Lafayette and his assistant James Armistead.

Corbis/Getty Images

“He later returned north with turncoat soldier Benedict Arnold and learned further details of British operations without being detected. Able to travel freely between both British and American camps, Armistead could easily relay information to Lafayette about British plans,” according to History.com.

Armistead did what few spies could, had direct access to the center of the British War Department, per Biography.com, relaying critical information to Lafayette and giving misleading intel to the British, per Biography.com.

Several of Armistead’s finest acts were said to have occurred in 1781, informing Lafayette and Washington about approaching British reinforcements, which allowed for a blockade to be created to impede the advancement.

And this critical information resulted in the annihilation of the British firepower and the arrival of some 10,000 British troops at Yorktown.

One of Armistead’s most valuable pieces of intel came near the end of the summer in 1781. He sent a note to Lafayette, detailing Cornwallis’ move from Portsmouth to Yorktown and the expected arrival of 10,000 British troops at the new location.

According to Washington’s Library, “Washington’s Continental Army, substantially aided by French land and naval forces, surrounded the British southern army under the command of General Charles, Earl of Cornwallis.”

The siege, combined with constant bombardment, weakened Cornwallis’s forces, forcing the British commander’s surrender on October 19, 1781.

Marquis de Lafayette’s original certificate commending James Armistead for his revolutionary war service, 1784.

Smith Collection/Gado/Getty Images

Despite providing the critical intelligence that led to America’s independence, ironically, Armistead returned to his master to continue his life of servitude after discovering that his spy work was not covered under a Virginia law in 1783.

Slaves who have faithfully served agreeable to the terms of their enlistment, and have thereby contributed towards the establishment of American liberty and independence, “should enjoy the blessings of freedom as a reward for their toils and labors,” according to the law.

But not Armistead who countless occasions petitioned the Virginia legislature for his freedom but was ignored.

According to History.com, it took the intervention of Lafayette for Armistead to be granted freedom.

In a 1784 testimonial, Lafayette acknowledged Armistead’s incredible work during the fight writing: “This is to certify that the Bearer has done essential services to me while I had the honor to command in this State. His Intelligence from the enemy’s [sic] camp were industriously collected and most faithfully delivered. He perfectly acquitted himself with some important commissions I gave him and appears to me entitled to every reward his situation can admit of.”

Armistead gained his freedom in 1787, living as a farmer in Virginia until his death on August 9, 1830.