a, f, k, Experimental time course of i.p. pretreatment in social CPP. a–e, Social CPP following pretreatment with i.p. MDMA at 5 mg kg−1 or 20 mg kg−1 shows that neither 5 mg kg−1 (b, n = 9 animals, t (8) = −0.61, P = 0.559) nor 20 mg kg−1 (c, n = 19 animals, t (18) = −1.071, P = 0.298) reopens the critical period for social reward learning (individual data, top; group average, bottom; two-tailed unpaired t-test). Comparisons of the normalized (top) and subtracted (bottom) social preference scores reveal no difference between 5 mg kg−1 and 20 mg kg−1 MDMA pretreatment groups (d, normalized, t (26) = −0.736, P = 0.468; subtracted, t (26) = −0.384, P = 0.704; two-tailed paired t-test). e, Normalized social preference in groups pretreated with MDMA (5 mg kg−1 or 20 mg kg−1) plotted against the developmental time course of normalized social preference scores of untreated male mice (replotted from Fig. 1q). f–j, i.p. MDMA injection followed by 3 h in social or isolate context shows that MDMA pretreatment reinstates social CPP when given in a social (g, n = 26 animals, t (25) = −4.116, P < 0.0004) but not isolate (h, n = 29 animals, t (28) = −1.97, P = 0.059) context. The social preference score following MDMA + 3 h isolation is lower than that following MDMA + 3 h social (i, normalized, t (53) = 2.239, P = 0.029; subtracted, t (53) = 2.185, P = 0.033; two-tailed unpaired t-test). j, Normalized social preference in groups pretreated with MDMA followed by 3 h isolation or 3 h social setting plotted against the developmental time course of normalized social preference scores of untreated male mice (replotted from Fig. 1q). k–r, Following pretreatment with i.p. MDMA, reinstatement of social CPP is apparent after 6 h (l, n = 19, t (18) = −2.266, P = 0.036), lasts at least 2 weeks (m, n = 25, t (24) = −4.421, P < 0.0001) and returns to saline-pretreated levels by 4 weeks following MDMA pretreatment (o, MDMA, n = 19, t (18) = −0.319, P = 0.753; p, saline n = 9, t (8) = 0.098, P = 0.924) (two-tailed paired t-test). There is no difference between the 6-h and 2-week MDMA pretreatment groups (n, normalized (t (42) = −1.611, P = 0.115; subtracted, t (42) = −1.011, P = 0.318) or the MDMA and saline pretreatment groups 4 weeks after treatment (q, normalized, t (26) = 0.701, P = 0.49; subtracted, t (26) = 0.258, P = 0.799) (two-tailed unpaired t-test). r, Normalized social preference in groups pretreated with MDMA (6 h, 2 and 4 weeks) and saline (4 weeks) plotted against the developmental time course of normalized social preference scores of untreated male mice (replotted from Fig. 1q). s–v, cCPP following pretreatment with i.p. MDMA. s, Experimental time course of i.p. injections before and during cCPP experiments in t–v. t, u, Individual (top) and average (bottom) time spent in the cocaine-paired context indicates a significantly increased preference for the cocaine (20 mg kg−1) context after conditioning (saline, n = 10 animals, t (9) = −3.562, P = 0.006; MDMA, n = 16 animals, t (15) = −5.477, P < 0.0001, two-tailed paired t-test). v, Comparisons between mice pretreated with saline and MDMA 2 days before cCPP reveals no difference in normalized cocaine preference (t (24) = −0.322, P = 0.75) or subtracted cocaine preference (t (24) = −0.001, P = 0.999) (two-tailed unpaired t-test). Data are presented as mean ± s.e.m. *P < 0.05; n.s., comparisons not significant (P > 0.05).