The stability of convection in a horizontal porous layer which is saturated with fluid and induced by horizontal temperature gradients subjected to horizontal mass flow is investigated by means of linear and nonlinear stability analysis. The effects of variable gravity field and vertical throughflow are also considered in this analysis. The nonlinear stability analysis part has been developed via energy functional. Shooting and Runge–Kutta methods have been used to solve eigenvalue problem in both cases. Critical vertical thermal Rayleigh numbers for both linear and nonlinear analyses RL and RE are evaluated for different values of horizontal Rayleigh number Rx, horizontal Peclet number Pe, vertical Peclet number Qv and variable gravity parameter η. Comparison is made between linear and nonlinear stability results. It has been observed that linear stability results are overpredicting the onset of convection compared with nonlinear theory, and hence subcritical instabilities would arise before one gets the onset of linear stability threshold. © 2015, Springer Science+Business Media Dordrecht.