Female Sprague-Dawley rats were ovariectomized at 13 months of age. Four groups received different regimens of estrogen or estrogen plus progesterone replacement beginning either immediately, 3 months, or 10 months after ovariectomy and were compared with non-hormone-treated controls. Eight to twelve months after ovariectomy, animals were trained on a delayed matching-to-position (DMP) spatial memory task. Long-term treatment with estrogen or estrogen plus progesterone significantly enhanced acquisition of the DMP task by aged animals after long-term loss of ovarian function. Weekly administration of estrogen and progesterone was at least as effective as, if not more effective than, continuous treatment with estrogen alone. In addition, treatment initiated 3 months, but not 10 months, after ovariectomy was as effective at enhancing DMP acquisition as continuous estrogen treatment initiated immediately after ovariectomy, suggesting a window of opportunity after the loss of ovarian function during which hormone replacement can effectively prevent the effects of aging and hormone deprivation on cognitive function. These findings suggest that repeated treatment with estrogen and progesterone initiated within a specific period of time after the loss of ovarian function may be effective at preventing specific negative effects of hormone deprivation on brain aging and cognitive decline.