Introduction: An increasing number of middle-aged men are being screened for low testosterone levels and the number of prescriptions for various forms of testosterone replacement therapy (TRT) has increased dramatically over the last 10 years. However, the safety of TRT has come into question with some studies suggesting increased morbidity and mortality. Objective: Because the benefits of estrogen replacement in postmenopausal women and ovariectomized rodents are lost if there is an extended delay between estrogen loss and replacement, we hypothesized that TRT may also be sensitive to delayed replacement. Methods: We compared the effects of testosterone replacement after short-term (2 weeks) and long-term testosterone deprivation (LTTD; 10 weeks) in middle-aged male rats on cerebral ischemia, oxidative stress, and cognitive function. We hypothesized that LTTD would increase oxidative stress levels and abrogate the beneficial effects of TRT. Results: Hypogonadism itself and TRT after short-term castration did not affect stroke outcome compared to intact rats. However, after long-term hypogonadism in middle-aged male Fischer 344 rats, TRT exacerbated the detrimental behavioral effects of experimental focal cerebral ischemia, whereas this detrimental effect was prevented by administration of the free-radical scavenger tempol, suggesting that TRT exacerbates oxidative stress. In contrast, TRT improved cognitive performance in non-stroked rats regardless of the length of hypogonadism. In the Morris water maze, peripheral oxidative stress was highly associated with decreased cognitive ability. Conclusions: Taken together, these data suggest that TRT after long-term hypogonadism can exacerbate functional recovery after focal cerebral ischemia, but in the absence of injury can enhance cognition. Both of these effects are modulated by oxidative stress levels.