We consider a system which deteriorates with age and may experience a failure at any time instant. On failure, the system may be replaced or repaired. The repair can partially reset the failure intensity of the unit. Under a suitable cost structure it has been proved in the literature that the average-cost optimal policy is of control-limit type, i.e. it conducts a replacement if and only if, on the nth failure, the real age of the system is greater than or equal to a critical value. We develop an efficient special-purpose policy iteration algorithm that generates a sequence of improving control-limit policies. The value determination step of the algorithm is based on the embedding technique. There is strong numerical evidence that the algorithm converges to the optimal policy. 2006 Elsevier B.V. All rights reserved.