A proportion of patients do not recover fully from surgery or they develop chronic postsurgical pain. The aim of this study was to examine the incidence and predictors of unfavourable long-term outcome after surgery using a prospective cohort design. Methods: Some 401 patients undergoing various elective surgical procedures filled in the RAND 36-item Health Survey 1.0 health-related quality-of-life questionnaire before operation and at 6 and 12 months of follow-up to assess changes in pain, physical functioning, mental health and vitality. Preoperative psychological assessment was obtained. Results: Most patients showed improvement in the various aspects of health-related quality of life after surgery, but a considerable proportion (14-24 per cent) still showed deterioration at 6 and 12 months. Multivariable linear regression analysis identified acute postoperative pain, duration of the operation and preoperative physical condition as the most important predictors of long-term pain and physical functioning. Preoperative surgical fear also had a small but significant contribution. The main predictors of mental health and vitality were physical condition before surgery, surgical fear and optimism. Conclusion: Up to a quarter of patients experienced suboptimal recovery after surgery. Both somatic and psychological factors were associated with the long-term outcome. Optimal recovery could be promoted by effective interventions on malleable factors.