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