French food scientist Hippolyte Mege-Mouries discovered margarine after mixing together ingredients such as beef tallow, skim milk and water. Mege-Mouries called his invention "oleomargarine," which got shortened to "margarine." He created the edible spread in an attempt to win competition money offered by Emperor Louis Napoleon III, who sought a low-cost alternative to butter. Margarine didn't go over well in France, and Mege-Mouries sold the patent to his invention to Anton Jurgens, a Dutch butter merchant.
Margarine first arrived in the United States in the 1870s, much to the chagrin of American dairy farmers who saw the spread as a threat to butter sales. Within 10 years, 37 manufacturing companies provided margarine for the American consumer market. Early versions of margarine contained large quantities of hard animal fat and very little vegetable fat. Technological advances over the years has changed margarine's composition from animal fat to hydrogenated vegetable oils. As the war between butter and margarine producers heated up, the federal government placed a tax on margarine, and some states forbid the use of dyes that colored margarine to resemble butter.
The popularity of margarine grew during World War II as butter became scarce. After the war, restrictive laws on margarine were lifted, and the spread became an acceptable butter alternative to consumers. Former First Lady Eleanor Roosevelt helped promote margarine to the public in TV advertisements.