There are several types of pharmaceutical competition. In addition to competition among producers of the same chemical substance (“within‐substance competition”), there may be competition among producers of different chemical substances in the same chemical subgroup (“between‐substance competition”). There have been numerous econometric studies of the effect of within‐substance competition on drug prices, but empirical evidence about the effect of between‐substance competition is far more limited. The primary objective of this study is to assess the impact of the entry of new drugs in a drug's therapeutic class on branded drug prices, generic drug prices, and the generic market share, using publicly‐available US data for the period 1997–2017. Two methods are used to estimate the effects of between‐substance and within‐substance competition on those variables. The first method is standard 2‐way fixed effects estimation based on aggregate data. The second method, based on micro data, is estimation using the DID_MULTIPLEGT procedure developed by de Chaisemartin et al. (2021), which does not rely on, and allows us to test for, “parallel trends.” Between‐substance competition does not appear to have any effect on brand‐name drug prices, although our inability to fully account for rebates may bias the estimates towards zero. (There is also little evidence for an effect of within‐substance competition on brand‐name drug prices.) However, between‐substance competition has a significant negative effect on generic drug prices. We estimate that the 1985–2005 increase in the number of substances ever registered in a drug's ATC4 chemical subgroup reduced the 2017 price of generic drugs by 42%. (The ratio of the generic‐price reduction attributable to rising between‐substance competition to the generic‐price reduction attributable to rising within‐substance competition also happens to be 42%.) A striking finding is that the entry of imitators has no effect on the prices of brand‐name drugs, but the entry of innovators has a significant negative effect on the prices of generic drugs in the same ATC4 chemical subgroup. In addition, between‐substance competition has a significant positive effect on the generic market share: the 1985–2005 increase in the number of substances ever registered in a drug's ATC4 chemical subgroup increased the 2017 generic market share by 15.0 percentage points. Due to its effects on generic drug prices and the generic market share, the 1985–2005 increase in between‐substance competition reduced the average 2017 price of drugs that were already sold in 1997 by 35%. We estimate that 36% of 2017 expenditure on drugs that were first registered during 1986–2005 was offset by reduced 2017 expenditure on drugs that were sold in both 1997 and 2017.