The extant theory on price discrimination in input markets takes the structure of the intermediate industry as exogenously given. This paper endogenizes the structure of the intermediate industry and examines the effects of banning third-degree price discrimination on market structure and welfare. We identify situations where banning price discrimination leads to either higher or lower prices for all downstream firms. These findings are driven by the fact that upstream profits are discontinuous due to entry being costly. Moreover, permitting price discrimination fosters entry which in many cases improves welfare. Nevertheless, entry can also reduce welfare because it may lead to a severe inefficiency in production.