Ketchup is found in 97 percent of U.S. homes and probably 100 percent of barbecues. But there’s more to this sauce than hamburgers, hot dogs and Heinz. In fact, ketchup has a storied past that dates back to imperial China, where it was made with fish entrails, meat byproducts and soybeans. It wasn't until 1812 that a tomato-based ketchup was invented.

Ketchup's ancient history

The ancestor of modern ketchup was completely tomato-free. Though tomato plants were brought to England from South America in the 1500s, their fruits weren’t eaten for centuries since some people considered them poisonous. (When wealthy Englishmen ate from lead pewter plates, for example, the acid of the tomato leeched the lead into the food, causing lead poisoning.) Instead, the precursor to our ketchup was a fermented fish sauce from southern China. As far back as 300 B.C., texts began documenting the use of fermented pastes made from fish entrails, meat byproducts and soybeans. The fish sauce, called “ge-thcup” or “koe-cheup” by speakers of the Southern Min dialect, was easy to store on long ocean voyages.

The pastes spread along trade routes to Indonesia and the Philippines, where British traders developed a taste for the salty condiment by the early 1700s. They took samples home and promptly corrupted the original recipe.

The golden age of ketchup

The 18th century was a golden age for ketchup. Cookbooks featured recipes for ketchups made of oysters, mussels, mushrooms, walnuts, lemons, celery and even fruits like plums and peaches. Usually, components were either boiled down into a syrup-like consistency or left to sit with salt for extended periods of time. Both these processes led to a highly concentrated end product: a salty, spicy flavor bomb that could last for a long time without going bad.

One oyster ketchup recipe from the 1700s called for 100 oysters, three pints of white wine and lemon peels spiked with mace and cloves. The commemorative “Prince of Wales” ketchup, meanwhile, was made from elderberries and anchovies. Mushroom ketchup was apparently Jane Austen's favorite.

Advertising Archive/Everett

Tomato ketchup is invented

Finally, in 1812, the first recipe for tomato-based ketchup debuted. James Mease, a Philadelphia scientist, is credited with developing the recipe. He wrote that the choicest ketchup came from “love apples,” as tomatoes were then called. (Some believed tomatoes had aphrodisiac powers.)

Before vinegar became a standard ingredient, preservation of tomato-based sauces was an issue, as the fruits would quickly decompose. A relatively new company called Heinz introduced its famous formulation in 1876, which contained tomatoes, distilled vinegar, brown sugar, salt and various spices. They also pioneered the use of glass bottles, so customers could see what they were buying.

Did you know? Heinz is famous for its '57 varieties,' but by the time the company started using the number they already had more than 60 products. The number is in fact made up from Heinz’s and his wife’s favorite numbers…5 and 7.

Tomato-based ketchup slowly became the ubiquitous form of the condiment in the U.S. and Europe. Today, Heinz is the best-selling brand of ketchup in the United States, with more than 650 million bottles sold each year. With the rise of commercial ketchup, do-it-yourself recipes have all but gone extinct. And at least for Americans, it's impossible to imagine ketchup as anything other than bright red and tomato-y.

READ MORE: The History of Ballpark Food

Watch a preview of The Food That Built America. The three-night event begins Sunday, Aug 11, at 9/8c