Portuguese schools have high student failure and early school leaving rates (Pordata, 2017) giving rise to a number of initiatives aimed at their reduction. The "Alternative Curricular Course" (ACC) promotes the learning of basic skills, specifically in Portuguese language and Mathematics, to support logical reasoning and artistic, vocational, and professional development. Its main goal is the fulfilment of compulsory schooling and the reduction of academic failure. Research based on attachment theory (Bowlby, 1969) suggests that different internal working models of attachment are associated with different characteristics of social, academic, emotional, and behavioural competencies that may interfere in the quality of relationships that young people establish in school, especially with teachers, and also influence their academic performance. This study evaluates the relationship between internal working models of students, their perceptions of the quality of their relationships with teachers, and their academic performance using three measures: (i) the "Inventory of Attachment in Childhood and Adolescence" (IACA) measure, (ii) the "Inventory of Parent and Peer Attachment" (IPPA) measure-concerning the attachment to teacher", and (iii) a socio-demographic questionnaire on a sample of 305 students from the 8th grade of regular education (RE) and the ACC. The results reveal that students on the ACC exhibit a less secure internal working model than students in RE, and that the perception of the quality of the student-teacher relationship, regarding the dimension of acceptance and understanding by the teachers, is associated with a better academic performance. These results align with those of other recent studies in support of the conclusion that the process of attachment has a significant influence on educational contexts, consistent with attachment and related theories.