Resumen: We present a model for the corrective and preventive maintenance of a system. The latter is based on a bivariate policy that replaces the system either at age T or after the M failure, whichever comes first. A repair follows each of the M − 1 first failures, restoring the system operational state, but with a lower reliability than before failing. We present two scenarios with constant and time-dependent repair costs. The results reveal that systems with low initial reliability can greatly benefit from the bivariate policy. The advantage decreases for poor quality repairs. We also obtain conditions to obtain the optimum number M when T is given. This result is helpful to assess whether a system should be replaced sooner than originally planned. Idioma: Inglés DOI: 10.1177/1748006X251414181 Año: 2026 Publicado en: Proceedings of the Institution of Mechanical Engineers. Part O, Journal of risk and reliability (2026), [19 pp.] ISSN: 1748-006X Tipo y forma: Artículo (Versión definitiva) Área (Departamento): Área Estadís. Investig. Opera. (Dpto. Métodos Estadísticos)