If you've been listening to the advice of medical professionals for the past few decades, you'll pop an aspirin while you wait for the ambulance. And if you've been listening closely, you've already been taking it every day. Aspirin's benefit to heart-attack victims is common knowledge these days, while its effectiveness as a painkiller, or analgesic, is increasingly overlooked.

That's no problem for Bayer, aspirin's first modern manufacturer, which has rebranded its product as a "Wonder Drug" and made it a staple for aging baby boomers across the Western world. The rebranding triggered a remarkable resurgence for the company whose signature product once appeared doomed.

Aspirin as a painkiller is old news. The ancient Egyptians wrote of the medical benefits of willow in the Ebers Papyrus, a text sold to an American antiques dealer by grave robbers in 1862. Willow contains salicylate, a key aspirin component, and the Egyptians had probably learned to use it as a salve and a tonic (although their preferred pain relief method was getting drunk). A few thousand years later in the mid-18th century, the English Rev. Edward Stone rediscovered willow's healing powers but failed to bring his finding to a wider audience. It wasn't until the late 1890s that a small German drug and dye factory called Bayer properly synthesized aspirin's various ingredients into a single drug. (Bayer faced stiff competition from another extremely popular new pain reliever called heroin.)

Eventually Bayer secured international patents for aspirin, shipping the product across the globe and turning a massive profit. But their patents were dissolved in Britain and Australia during World War I, opening up the market to a glut of generic competitors. This wasn't the only challenge posed to aspirin by the war, as Diarmuid Jeffreys recounts in "Aspirin: The Remarkable Story of a Wonder Drug." Facing a British embargo of phenol, a necessary ingredient of aspirin, Bayer nearly ceased production of aspirin in its German factories. Confronting pharmaceutical catastrophe, the German government covertly deployed a former Bayer employee to the United States to buy surplus phenol from the country's most prolific producer of the chemical, Thomas Edison. The Great Phenol Plot was exposed and the brand's reputation was ruined in America. Soon after, the U.S. government snatched Bayer's American holdings, nullified its patents and trademarks, and sold everything to Sterling Products, who owned the company's American branch until 1994.

The German branch of Bayer, Bayer AG, survived the war only to be bought up by the mega-corporation IG Farben in 1925. The corporation was dissolved in 1952 after many of its leaders were convicted of war crimes. Its factories — run by slave laborers — had produced the Zyklon B used to kill Jews in concentration camps. Bayer AG endured the dissolution of its parent company only to find itself steadily losing its market shares to new painkillers acetaminophen and ibuprofen. After surviving two world wars, the brand faced death at the hands of the free market.

Then a small miracle occurred: In the late 1960s, two British medical researchers, John O'Brien and Peter Elwood, uncovered studies by John Vane and Harvey Weiss suggesting that aspirin could improve heart health. Intrigued, O'Brien and Peter developed a theory that aspirin could prevent blood platelets from clumping up around the heart. These clumps are liable to burst, allowing blood clots to form and prevent blood flow to heart, causing a heart attack. By preventing these clots from forming, O'Brien and Elwood postulated, aspirin enables blood flow to the heart to remain steady, seriously reducing the risk of heart attack. In several medical trials, the researchers proved that a daily dose of aspirin taken by a heart attack survivor significantly decreases his risk of a second attack, confirming their hypothesis.

The small sample size of their study cast doubt on its conclusions. In 1980, however, a British statistician named Richard Peto published a meta-analysis with apparently irrefutable evidence that aspirin had a positive effect on the heart, at least in male patients.

Bayer took note. By this point, Bayer Aspirin's pain relief market share was hovering at around 6 percent, a precipitous drop from its former dominance. Bayer's parent company in the United States, Sterling Products, jumped at the chance to rebrand its product as a vital tool in the fight against heart attacks. In 1983, Sterling lobbied the FDA for the ability to advertise aspirin's cardiovascular benefits on the product's labels. The company won the battle and soon began to rebrand its product as a life saver. Soon after, a slew of studies suggested that an aspirin a day could prevent the first occurrence of a heart attack — not only a second — and that an aspirin taken during a heart attack increases the victim's chance of survival. Other researchers demonstrated aspirin's effectiveness in preventing strokes, inhibiting blood clots from blocking blood to the brain. Aspirin was no longer limited to the pain relief market. It had become a market all its own.

Bayer's profits have risen accordingly. In 1994, the German branch of Bayer bought back its American holdings from Sterling Products for $1 billion, uniting the company for the first time since World War I. In 2011, the company doubled its profits from the previous year, to $3.3 billion.

For a company nearly left for dead three times in a century, that's an impressive comeback.