The 4th order Darcy-Bénard eigenvalue problem for the onset of thermal convection in a 3D rectangular porous box is investigated. We start from a recent 2D model [1] for a rectangle with hand-picked boundary conditions defying separation of variables so that the eigenfunctions are of nonnormal mode type. In this paper, the previous 2D model [1] is extended to 3D by a Fourier component with wavenumber k in the horizontal y direction, due to insulating and impermeable sidewalls. As a result, the eigenvalue problem is 2D in the vertical xz-plane, with k as a parameter. The transition from a preferred 2D mode to 3D mode of convection onset is studied with a 2D non-normal mode eigenfunction. We study the 2D eigenfunctions for a unit width in the lateral y direction to compare the four lowest modes k m = mπ (m = 0, 1, 2, 3), to see whether the 2D mode (m = 0) or a 3D mode (m ≥ 1) is preferred. Further, a continuous spectrum is allowed for the lateral wavenumber k, searching for the global minimum Rayleigh number at k = k c and the transition between 2D and 3D flow at k = k * . Finally, these wavenumbers k c and k * are studied as functions of the aspect ratio.