In 1751, a teenaged George Washington emerged from a harrowing bout of smallpox, which he had contracted in Barbados, that left him weak, pockmarked, and well aware of just how catastrophic an outbreak of the insidious disease could be. Nearly 25 years later, the experience would help him prevent smallpox from ravaging the ranks of American soldiers, an event that could have dramatically affected the outcome of the American Revolution.

As Andrew Lawler reports for National Geographic, British, Canadian, and German troops surged into Boston in 1775 to quell the burgeoning revolt, bringing with them both weapons and, unwittingly, germs. While the foreign forces had built up an immunity to smallpox due to previous exposure, Boston colonists were no match for the disease, which began to spread through the city. To keep it from infecting his Continental Army, stationed across the Charles River, Washington forbade anybody from Boston from entering his camp and quarantined any soldier who showed signs of sickness. Washington’s precautionary measures proved successful, but the venerated general wasn’t satisfied with temporarily keeping smallpox at bay: He wanted to inoculate his entire army.

There were a few significant stumbling blocks to this course of action. For one, the vaccination process—known as variolation, after variola, the virus that causes smallpox—was still illegal in some states, and the Continental Congress had outright prohibited military surgeons from inoculating soldiers. Much like modern vaccinations, variolation entailed injecting a patient with a tiny quantity of the virus, just enough for the immune system to fight it off without seriously sickening or killing the patient. When administered properly, variolation resulted in immunity. If the dosage was wrong, however, it could lead to death—which had happened to King George III’s own son.

Washington wasn’t exactly abstaining from mass inoculation on behalf of the legislature, though. Even when done correctly, the vaccination can produce smallpox symptoms, and Washington couldn’t afford for thousands of his soldiers to be incapacitated for weeks right in the middle of the war. Instead, he ignored Congress’s order and mandated variolation only for newly recruited men, calculating that they would be fully recovered before heading into battle.

Despite his efforts, smallpox was already wreaking havoc on the existing troops. In May 1776, for example, Major General John Thomas lost somewhere between one third to one half of his 10,000 soldiers to smallpox during a siege on Quebec (which they did not win), and Thomas himself died of the disease on June 2.

“The smallpox is ten times more terrible than Britons, Canadians, and Indians together,” John Adams wrote.

In February 1777, Washington told Continental Congress president John Hancock that he saw no other way to prevent the spread of the disease than to inoculate the whole army. By the end of the year, variolation had been performed on about 40,000 soldiers, and infection rates plummeted from 20 percent to a measly 1 percent. Soon after that, legislators across the fledgling nation did away with variolation prohibition.

While Washington has long been lauded for leading American revolutionaries to victory on the battlefield, his shrewd foresight and strong leadership in the face of disease was just as, if not more, important.

“A compelling case can be made that his swift response to the smallpox epidemic and to a policy of inoculation was the most important strategic decision of his military career,” historian Joseph Ellis told National Geographic.

[h/t National Geographic]