The Lieb–Oxford bound, a nontrivial inequality for the indirect part of the many-body Coulomb repulsion in an electronic system, plays an important role in the construction of approximations in density functional theory. Using the wave function for strictly correlated electrons of a given density, we turn the search over wave functions appearing in the original bound into a more manageable search over electron densities. This allows us to challenge the bound in a systematic way. We find that a maximising density for the bound, if it exists, must have compact support. We also find that, at least for particle numbers N ≤ 60, a uniform density profile is not the most challenging for the bound. With our construction, we improve the bound for N = 2 electrons that was originally found by Lieb and Oxford, we give a new lower bound to the constant appearing in the Lieb–Oxford inequality valid for any N, and we provide an improved upper bound for the low-density uniform electron gas indirect energy.