Résumé : Previous research has shown that dietary magnesium (Mg2+) deficiency prior to injury worsens recovery of function and that systemic administration of Mg2+ pre or post-injury significantly improves functional recovery. The purpose of the present study was to determine if manipulations in dietary Mg2+ would alter functional recovery following unilateral cortical injuries. Two weeks prior to injury, rats were placed on a customized diet enriched with Mg2+, deficient in Mg2+, or on a standard Mg2+ diet. Rats were then prepared with unilateral cortical contusion injuries (CCI) of the sensorimotor cortex. Two days following CCI, rats were tested on a battery of sensorimotor (vibrissae-forelimb placing and bilateral tactile adhesive removal tests), as well as the acquisition of reference memory in the Morris water maze. Serum analysis for Mg2+ prior to injury showed a diet-dependent modulation in levels. The Mg2+-enriched diet showed significantly higher levels of serum Mg2+ compared to the normal diet and the Mg2+-deficient diet showed significantly lower levels compared to the Mg2+-normal diet. On the placing and tactile removal tests Mg2+ deficiency significantly worsened recovery compared to the Mg2+-enriched and Mg2+-normal diet conditions. There were no statistically significant differences between the Mg2+-normal and Mg2+-enriched diets on the sensorimotor tests. On the acquisition of reference memory there were no significant difference between diet conditions; however, the Mg2+-deficient diet showed a trend toward impaired performance compared to the other diet conditions. The Mg2+-deficient diet resulted in a larger lesion cavity compared to the other diet conditions. These findings suggest that dietary Mg2+ modulates recovery of function.