In this paper, we prove a sharp nonuniqueness result for the incompressible Navier-Stokes equations in the periodic setting. In any dimension d ≥ 2 and given any p < 2, we show the nonuniqueness of weak solutions in the class L p t L ∞ , which is sharp in view of classical uniqueness results. The proof is based on the construction of a class of non-Leray-Hopf weak solutions. More specifically, for any p < 2, q < ∞, and ε > 0, we construct non-Leray-Hopf weak solutions u ∈ L p t L ∞ ∩ L 1 t W 1,q that are locally smooth outside a singular set in time of Hausdorff dimension less than ε. As a byproduct, examples of anomalous dissipation in the class L 3/2−ε t C 1/3 for the Euler equations are given.