Butter just may have come to us straight from the ancestors of Genghis Khan.

Eurasian nomads, the story goes, carried mare’s milk in skin bags on long journeys—and repeated sloshing on horseback churned the liquid into the first butter. Opposing legend says that the Arabs made it first, on loping camels.

However it evolved, butter has been with us for at least 4000 years. Our word butter comes from the ancient Greek–a combo of bous (cow) and turos (cheese)–still appropriate today, since the bulk of modern American butter comes from cows.

Butter, from its ancient inception, had nothing much in the way of competition until 1869. In that year French chemist Hippolyte Mège-Mouriès–spurred on by a hefty financial prize offered by Emperor Louis Napoleon III–patented a lower priced spread made from beef tallow. He dubbed it oleomargarine–from the Latin oleum, meaning beef fat, and the Greek margarite, meaning pearl, this last for its presumably pearlescent luster. The Emperor was hoping that a cheaper butter alternative would benefit the lower classes and the military, neither of which seems to have appreciated it much. Mège-Mouriès sold his patent to Jurgens, a Dutch butter-making company, which eventually became part of Unilever, still one of the world’s major producers of margarine. He never profited from his discovery, and died (poor) in 1880. He must have found it infuriating that he lived long enough to see his margarine attaining international fame.

Margarine arrived in the United States in the 1870s, to the approbation of the broke, and to the universal horror of American dairy farmers. Within the next decade there were 37 companies in the United States enthusiastically manufacturing margarine; and “margarine” and “butter” had become fighting words. In 1886, passionate lobbying from dairy industry led to the federal Margarine Act, which slapped a restrictive tax on margarine and demanded that margarine manufacturers pay prohibitive licensing fees. Maine, Michigan, Minnesota, Pennsylvania, Wisconsin, and Ohio went a step further and banned margarine outright.

Margarine, its foes proclaimed, threatened the family farm, the American way of life, and the moral order. Impassioned speeches were made in defense of “sweet and wholesome” butter. Governor Lucius Hubbard of Minnesota bemoaned the fact that “the ingenuity of depraved human genius has culminated in the production of oleomargarine and its kindred abominations.” Senator Joseph Quarles of Wisconsin (the Dairy State) thundered that butter should come from the dairy, not the slaughterhouse. “I want butter that has the natural aroma of life and health. I decline to accept as a substitute caul fat, matured under the chill of death, blended with vegetable oils and flavored by chemical tricks.”

Pro-butter political cartoonists pictured factories dropping everything from stray cats to soap, paint, arsenic, and rubber boots into the margarine mix; and a barrage of dubious scientific reports hinted that margarine caused cancer, or possibly led to insanity.

Then there was the question of color.

View Images Photograph by Tyler Wilson

Butter, traditionally, is yellow, a color ideally derived from plant carotene in the milk of grass-fed cows. Margarine, on the other hand, as made in the industrial vat, is white, the unappetizing shade of grade-school paste. Margarine manufacturers, to better appeal to the public, wanted to tint their product yellow; butter producers objected, claiming that yellow margarine, fraudulently masquerading as butter, was a deliberate ploy to deceive the public. (Butter from corn-fed cows is also anemically pale, and is routinely dyed to turn it an attractive butter-yellow; this practice, however, butter makers argued, was simply a cosmetic tweak.)

By 1902, 32 states had imposed color constraints on margarine. Vermont, New Hampshire, and South Dakota all passed laws demanding that margarine be dyed an off-putting pink; other states proposed it be colored red, brown, or black. The “pink laws” were overturned by the Supreme Court (on the grounds that it’s illegal to enforce the adulteration of food) but the ban on yellow margarine remained. (The last hold-out, Wisconsin, only repealed its margarine-color law in 1967.)

In the cash-strapped days of the Depression and during the butter shortages of World War II, however, margarine inexorably began to bypass butter. This was helped along by improvements in the manufacturing process–margarine was now made from hydrogenated vegetable oils rather than animal fats–and by a clever side-step of the yellow ban in which white margarine was sold with an included capsule of yellow food coloring. Buyers simply squished the two together to produce a nicely butter-colored non-butter spread. (Though not in Wisconsin, where using yellow margarine was a crime, punishable by fines or imprisonment.) Eleanor Roosevelt (in New York) promoted it, claiming that she ate margarine on her toast. By the 1970s, Americans were eating about ten pounds of margarine per person per year.

Eleanore Roosevelt promoted margarine on a television commercial in 1959.

Margarine may also have received some additional oomph from the famous Wisconsin senatorial taste test of 1955, in which senators, blindfolded, were challenged to tell the difference between butter and margarine. Good Wisconsinites all, most weren’t fooled–except, famously, the vociferously pro-butter Gordon Roselip, who preferred the margarine, insisting that it was butter. It turned out later that Roselip’s wife, worried about her husband’s heart, had for years been sneakily substituting (illegal) yellow margarine for butter at the Senator’s dinner table.

In the seemingly unending duel between butter and margarine, butter is winning the latest round: as of 2014, butter had surpassed margarine as America’s favorite spread. We’re now each eating on average 5.6 pounds of butter a year, as opposed to a dwindling 3.5 pounds of margarine. New evidence has shown that the trans fats in margarine may be worse for us health-wise than the saturated fats in butter. There’s also the upswing in the public’s preference for natural foods in favor of processed products—and a lot of people say that real butter just plain tastes better.

In terms of butter, it seems that what goes around, eventually comes around. This may be true for margarine too. In 2002—over three decades after the last margarine color ban was lifted—Parkay produced a new margarine in a “Fun Squeeze” bottle. It came in two colors. One of them was pink.

This story is part of National Geographic’s special eight-month Future of Food series.

References