||Available experimental data and linear stability analysis indicate that the secondary flow configurations of convection in a rectangular duct with a saturated porous medium heated from below and through which an axial flow is maintained are down-stream moving three-dimensional rolls (T modes) for low Péclet number or stationary longitudinal rolls (L rolls) otherwise. In this paper, a weakly nonlinear analysis is used and coupled envelope equations are derived to study the competition between T modes and L rolls in the neighborhood of a double bifurcation point where these two convective configurations become simultaneously unstable. An entire stability diagram of homogeneous nonlinear states is obtained and the evaluated mean heat transfer is found to compare well with experimental data. Moreover parameter boundaries for absolute and convective instability of the basic state with respect to T modes and L rolls are determined. In the case of convective instability, we obtain an analytical criterion which specifies conditions about the observability of either T modes or L rolls at the onset of convection. This criterion implies an explicit relation between the spatial growth of the two patterns and the magnitude of their inlet forcing. Suitable numerical simulations of the envelope equations perfectly validate the derived analytical criterion. On the other hand, in the region of absolute instability, it is found that the L roll/T mode transition observed in early experiments, is ascribed to the transition to absolute instability of the basic state with respect to L rolls. Additionally, numerical solutions as well as both temporal and spatial nonlinear stability theory demonstrate that the mixed mode is an unstable state in agreement with experimental results. Throughout this paper, major similarities as well as differences with the corresponding problem in pure fluids are particularly highlighted.