The use of so-called "pay-for-delay" settlements in patent litigation — in which a branded manufacturer and generic entrant settle a Paragraph IV patent challenge and agree to forestall entry — has come under considerable scrutiny in recent years. Critics argue that these settlements are collusive and lower consumer welfare by maintaining monopoly prices after patents should have expired. We estimate the impact of Paragraph IV challenges and settlements on generic entry and evaluate the implications for drug prices and quantity. To address the potential endogeneity of Paragraph IV challenges and settlements we estimate the model using instrumental variables. Our instruments include standard measures of patent strength and a measure of settlement legality based on a split between several Circuit Courts of Appeal. We find that Paragraph IV challenges increase generic entry, lower drug prices and increase quantity, while settlements effectively reverse the effect. These effects persist over time, inflating price and depressing quantity for up to 5 years after the challenge. We also find that eliminating settlements would result in a relatively small reduction in research and development (R&D) expenditures.