Various large-scale suppliers frequently use web-based spot markets, along with discount stores and foreign distributors, for inventory liquidation. Recognizing the potential benefits of such practices, we consider a multi-period, integrated replenishment, and liquidation problem for a capacitated supplier facing stochastic demand from a spot market along with its primary market (with higher priority contractual customers). In each period, the supplier must decide: (i) how much to produce, and (ii) if there are excess units left after sales to the primary market, how many of these to liquidate. We show that the optimal policy is characterized by two quantities: the critical produce-up-to level and the critical retain-up-to level. We establish bounds for these two quantities. We identify two practical benchmark policies and establish thresholds on the unit revenue earned from the spot market such that one of the two benchmark policies is optimal. We provide closed form expressions to determine these thresholds for the infinite horizon problem under specific conditions on the available production capacity. In general, it is difficult, if not impossible, to theoretically determine these thresholds in closed form for the finite horizon problem. Hence, we report results of a computational study to gain insights regarding the behavior of the optimal policy with respect to the spot market revenue. Our computational results also quantify the benefits of the optimal policy relative to the benchmark policies and examine the effects of demand correlation.