This paper studies oligopolistic competition in off-patent pharmaceutical markets using a vertical product differentiation model. This model can explain the observation that countries with stronger regulations have smaller generic market shares. It can also explain the differences in observed regulatory regimes. Stronger regulation may be due to a higher proportion of production that is done by foreign firms. Finally, a closely related model can account for the observed increase in prices by patent owners after entry of generic producers.