Hearing the phrase Great Scott! might evoke an image of a wide-eyed, Einsteinian Christopher Lloyd, but people were using it long before it became Dr. Emmett Brown’s go-to expression of surprise, consternation, and basically any other emotion in Back to the Future.

Like the real McCoy and many similar centuries-old colloquial terms, it’s difficult to prove exactly when the phrase emerged and who the original “great Scott” was. That said, most signs point to Winfield Scott, an American army general who towered over his troops both literally and figuratively. Scott stood 6 feet, 5 inches tall, and is said to have weighed as much as 300 pounds by the end of his life.

“What a monster size he was!” Virginia congressman John Sergeant Wise wrote in 1899. “His talk was like the roaring of a lion, his walk like the tread of the elephant.”

While his formidable physical appearance could’ve been enough to compel people to exclaim “Great Scott!” in his presence, his military reputation was just as impressive. Scott began his career as a captain of artillery during the War of 1812, where his triumphs in the battles of Chippewa and Lundy’s Lane in July 1814 earned him an official promotion to major general and the unofficial honor of being known as a national hero. Scott solidified his status as one of the greatest military commanders of the 19th century during the Mexican-American War, delivering the U.S. several key victories and marching into Mexico City in the summer of 1847, which brought about the end of the entire conflict. Scott unsuccessfully ran for president in 1852, losing to Franklin Pierce, but remained a high-ranking member of the military until retiring partway through the Civil War.

The phrase Great Scott! started to gain popularity around the same time the general himself was becoming a household name. As lexicographer Barry Popik points out on his blog, the earliest known reference to the phrase was in an 1845 issue of an Ohio political publication called the Spirit of Democracy: “Great Scott! is it possible that we ever promised to publish this law.”

Though that writer didn’t shed any light on who “Scott” was, others did. A 1952 article from Illinois’s Quincy Whig explained that “The exclamation of great SCOTT,’ so frequently used by many people, is said to allude to Gen. Scott, the whig candidate for President.” And Slate reports that author John William De Forest mentioned the general in two different works from the era.

“I follow General Scott,” he wrote in his 1867 Civil War novel Miss Ravenel’s Conversion From Secession to Loyalty. “We used to swear by him in the army. Great Scott! the fellows said.”

De Forest repeated the exclamation in an 1871 story, explaining that the character was “using the then commander-in-chief for an oath, as officers sometimes did in those days.”

Based on that evidence, it looks like Winfield Scott left his mark on military history and on the history of minced oaths—non-offensive replacements for profanity like Great Scott!, Zoonters!, and these 15 other goofy expletives.

[h/t Slate]