In the last decade, there has been burgeoning interest in the effectiveness of third-generation psychological therapies for managing fibromyalgia (FM) symptoms. The present study examined the effectiveness of acceptance and commitment therapy (ACT) on functional status as well as the role of pain acceptance as a mediator of treatment outcomes in FM patients. A total of 156 patients with FM were enrolled at primary health care centers in Zaragoza, Spain. The patients were randomly assigned to a group-based form of ACT (GACT), recommended pharmacological treatment (RPT; pregabalin + duloxetine), or wait list (WL). The primary end point was functional status measured with the Fibromyalgia Impact Questionnaire, FIQ. Secondary end points included pain catastrophizing, pain acceptance, pain, anxiety, depression, and health-related quality of life. The differences between groups were calculated by linear mixed-effects (intention-to-treat approach) and mediational models through path analyses. Overall, GACT was statistically superior to both RPT and WL immediately after treatment, and improvements were maintained at 6months with medium effect sizes in most cases. Immediately after treatment, the number needed to treat for 20% improvement compared to RPT was 2 (95% confidence interval 1.2-2.0), for 50% improvement 46, and for achieving a status of no worse than mild impaired function (FIQ total score less than 39) also 46. Unexpectedly, 4 of the 5 tested path analyses did not show a mediation effect. Changes in pain acceptance only mediated the relationship between study condition and health-related quality of life. These findings are discussed in relation to previous psychological research on FM treatment.