This paper presents an optimization-based control strategy for the power management of a wind farm with battery storage. The strategy seeks to minimize the error between the power delivered by the wind farm with battery storage and the power demand from an operator. In addition, the strategy attempts to maximize battery life. The control strategy has two main stages. The first stage produces a family of control solutions that minimize the power error subject to the battery constraints over an optimization horizon. These solutions are parameterized by a given value for the state of charge at the end of the optimization horizon. The second stage screens the family of control solutions to select one attaining an optimal balance between power error and battery life. The battery life model used in this stage is a weighted Amp-hour throughput model. The control strategy is modular, allowing for more sophisticated optimization models in the first stage or more elaborate battery life models in the second stage. The strategy is implemented in real time in the framework of model predictive control. Copyright © 2012 John Wiley & Sons, Ltd.