Over the past few years, an increasing number of critically needed medicines have been in short supply. Using economic theory to frame the drug-shortage problem, this paper explores why and how manufacturing-quality problems could combine with other economic and technological factors to result in shortages of generic sterile injectable drugs. The fundamental problem we identify is the inability of the market to observe and reward quality. This lack of reward for quality can reinforce price competition and encourage manufacturers to keep costs down by minimizing quality investments. The US Food and Drug Administration's (FDA's) need to use its regulatory flexibility, on behalf of patients, to avoid shortages of medically necessary drugs may further strengthen the incentive to "push the envelope" on quality. These dynamics may have produced a market situation in which quality problems have become sufficiently common and severe to result in drug shortages.