Persistent breast cancer treatment-related pain affects up to 40% of patients, decreasing their quality of life (QoL). While current research typically utilizes correlation and regression analysis to identify biopsychosocial phenotypes contributing to this pain, this study employs cluster analysis to identify qualitatively different phenotypes based on somatosensory and psychosocial characteristics both before and one week post-breast cancer surgery. Further, it investigates how these phenotypes are related to pain intensity one year post-surgery and examines the evolution of phenotype membership from pre- to post-surgery. Somatosensory and psychosocial functioning was evaluated pre- and post-surgery in 184 women undergoing unilateral breast cancer surgery. Eight different quantitative sensory testing (QST) methods including mechanical detection and pain thresholds, pressure pain thresholds, thermal detection and pain thresholds, and conditioned pain modulation were performed at the surgical area (trunk, arm, major pectoral muscle) and a distant location (quadriceps muscle). Psychosocial functioning was assessed using the Central Sensitization Inventory, Pain Catastrophizing Scale, Depression Anxiety Stress Scale-21, and the McGill Quality of Life Questionnaire. Pain intensity was evaluated one year post-breast cancer surgery using the Visual Analogue Scale. Latent class analysis identified five distinct phenotypes before and post-surgery, characterized by differences in mechanical and pain thresholds alongside psychosocial factors. Moreover, higher psychosocial distress and lower QoL correlated with elevated pain intensity one year post-surgery. These findings underscore the importance of addressing breast cancer patients' mental health perioperatively. Therefore, future research should explore whether psychological interventions perioperatively can reduce long-term pain intensity. PerspectiveThis secondary analysis, utilizing cluster analysis, reveals five distinct phenotype based on somatosensory and psychosocial characteristics both before and post breast cancer surgery. Higher psychosocial distress and lower quality of life correlated with elevated pain intensity one year post-surgery, emphasizing the need to address patients' mental health perioperatively. Trial registrationclinicaltrials.gov (NCT03351075)