Context.The combination of large segmented space telescopes, coronagraphy, and wavefront control methods is a promising solution for producing a dark hole (DH) region in the coronagraphic image of an observed star in order to study planetary companions. The thermal and mechanical evolution of such a high-contrast instrumental setup leads to wavefront drifts that degrade the DH contrast during the observing time, thus limiting the ability to retrieve planetary signals.Aims.Lyot-style coronagraphs are starlight-suppression systems that remove the central part of the image for an unresolved observed star, that is, the point spread function, with an opaque focal plane mask (FPM). When implemented with a flat mirror containing an etched pinhole, the mask rejects part of the starlight through the pinhole which can be used to retrieve information about low-order aberrations.Methods.We propose an active control scheme using a Zernike wavefront sensor (ZWFS) to analyze the light rejected by the FPM, control low-order aberrations, and stabilize the DH contrast. We first present the concept formalism and then describe how we characterized the sensor behavior in simulations and in the laboratory. We performed experimental tests to validate a wavefront control loop using a ZWFS on the HiCAT testbed.Results.By controlling the first 11 Zernike modes, we show a decrease in the standard deviation of the wavefront error by a factor of up to 9 between open- and closed-loop operations using the ZWFS. In the presence of wavefront perturbations, we show the ability of this control loop to stabilize a DH contrast around 7 × 10−8with a standard deviation of 7 × 10−9.Conclusions.Active control with a ZWFS proves to be a promising solution in Lyot coronagraphs with an FPM-filtered beam for controlling and stabilizing low-order wavefront aberrations and DH contrast for exoplanet imaging with future space missions.