A numerical study of uniform flow past a square cylinder in the presence of detached flat plate for various gap spacings using the multi-relaxation-time lattice Boltzmann method (MRT-LBM) has been undertaken. The Reynolds number is kept at 150 for all numerical calculations and the gap spacing (g) ranging from 0 to 11. Analyses of the vortex structure in the wake, the vortex shedding frequency, time-trace analysis of drag and lift coefficients and force statistics have been carried out. The existing results for flow past a square cylinder without detached flat plate are validated with the well-resolved results obtained experimentally and numerically. Numerical results reveal that as gap spacing increases, there exists a critical gap spacing at g = 2–2.25, where the mean drag coefficient, Strouhal number, root-mean-square values of the drag and lift coefficients reach either maxima or minima. Meanwhile, the shed vortices behind the detached flat plate are also affected. The observed results further indicate that there exists three different kinds of flow regimes: (i) extended-body flow regime (0 $${\leq}$$ g $${\leq}$$ 1.53); (ii) reattachment flow regime (1.9 $${\leq}$$ g $${\leq}$$ 4); and (iii) fully developed flow regime (4.8 $${\leq}$$ g $${\leq}$$ 11). The observed critical gap spacing and flow regimes are strongly dependent upon the gap spacings.