In this paper, under the linear regression model with heteroscedastic and/or correlated errors when the stochastic linear restrictions on the parameter vector are assumed to be held, a generalization of the ordinary mixed estimator (GOME), ordinary ridge regression estimator (GORR) and Generalized least squares estimator (GLSE) is proposed. The performance of this new estimator against GOME, GORR, GLS and the stochastic restricted Liu estimator (SRLE) [Yang and Xu, Statist. Papers 50 (2007) 639–647] are examined in terms of matrix mean square error criterion. A numerical example is considered to illustrate the theoretical results.