Let {ξ1,ξ2,…} be a sequence of independent random variables (not necessarily identically distributed), and η be a counting random variable independent of this sequence. We obtain sufficient conditions on {ξ1,ξ2,…} and η under which the distribution function of the random sum Sη=ξ1+ξ2+⋯+ξη belongs to the class of O-exponential distributions.