Children who live on the margins of society are disadvantaged in achieving their developmental potential because of the lack of a necessary stable environment and nurturing care. Many early prevention programs aim at mitigating such effects, but often the evaluation of their long-term effect is missing. The aim of the study presented here was to evaluate such long-term effects in two prevention programs for children-at-risk growing up in deprived social environments focusing on child attachment representation as the primary outcome as well as on self-reflective capacities of teachers taking care of these children. The latter was a key component for promoting resilient behavior in children. Five hundred and twenty-six children aged 36 to 60 months at risk due to immigration status, low family socio-economic status and child behavior were examined in a cluster-randomized study comparing two preventions, the psychodynamic, attachment-based holistic approach EARLY STEPS (ES) with the classroom based FAUSTLOS (FA) for their efficacy. Primary outcome was the child attachment representation measured by the Manchester Child Attachment Story Task (MCAST). Secondary outcomes were derived from (a) the Caregiver-Teacher Report Form (C-TRF: problem behaviors, including anxiety/depressive symptoms, emotional-reactive and somatic problems, social withdrawal, aggressive behavior, and attention deficit), from (b) the Strength and Difficulties Questionnaire (SDQ, parent version: resilience and wellbeing) and (c) Self-Reflective Scales for teachers (SRS: self-reflective capacities of teachers). Compared to baseline, attachment and behavioral problems improved in both programs. ES led to more secure and more organized attachment representations (medium effect sizes). Aggressive behavior and externalizing problems were reduced in the FA group compared with ES, particularly in boys (medium effect sizes). Self-reflective capacities of the teachers increased only in the ES group. High correlation between children’s attachment type with the number of social risk factors and the increase of problematic social behavior strongly indicate that an increase in teachers’ self-reflective capacities helps to change children’s attachment patterns which thus strengthens the resilience of these children-at-risk [An ethical vote from LPPKJP 2009-02-25 was obtained and the trial registered; Clinical trial registration information: The trial was registered 14.02.2012 (DRKS00003500; https://www.drks.de)].