The dropout or evasion rates in higher education are now a social and institutional concern, justifying the implementation of public policies to prevent this phenomenon. These policies need studies on the most determinant variables of the risk of dropout. The main objective of this study is to analyze the student's persistence in undergraduate courses, and the relationship with the student's previous school trajectory and with the conditions of entrance into higher education, controlling for students' sociodemographic characteristics, such as gender and age. We applied multilevel logistic regression models to data of 2.697 freshmen enrolled in a Portuguese public university in the academic year 2015/16. The results suggest that failure in basic education (ISCED 2) has a long-term effect. According to the estimates obtained, students who declare not having failed in basic education have odds ratio of persistence 2.7 times higher than students who declare having failed in basic education. The conditions of student's admission to the course he/she attends are relevant variables to persistence in Higher Education, for example, whether s/he was admitted to her/his first option course and the student's university entrance score. The results also show that older and male students have lower probability of persistence.