In this paper, we estimate the influence of social networks on students’ educational attainment in school. Specifically, we investigate the impacts of separating from pre-existing social relationships during the transition from elementary to middle school on students' academic progress. We define several types of friendships—identified by the students themselves in elementary school, as part of a unique aspect of the Tel Aviv school choice application process which allows sixth-grade students to designate their middle schools of choice and to list up to eight friends with whom they wish to attend that school. Our identification strategy is based on a conditional random assignment model: in Tel Aviv middle schools students are randomly assigned to classes within a given school. Therefore, conditional on the number of friends a student has at her school, the number of friends she attends class with should be random. Our results suggest that the number of friends has positive effects on educational outcomes of students, depending on friends’ mean socioeconomic background and on the type of the relationship (reciprocal versus non-reciprocal), in the short term (on middle school national exam test scores) and in the long term (end of high-school high stakes matriculation exams). We find that friends who are close neighbors have larger effect but this heterogeneity in treatment effect is not precisely measured. We also find that the effect of friendship is not sensitive to the length of acquaintance. We find that these characteristics of students’ social networks affect non-cognitive outcomes as well, suggesting that these educational gains might be partly mediated through greater cooperation, reduction in violent behavior and improvements in social satisfaction in class.​