The anterior-posterior axis of Drosophila originates from two symmetry-breaking steps during early oogenesis. First, one of the two pro-oocytes within the cyst of 16 germline cells is selected to become the oocyte. This cell then comes to lie posterior to the other germline cells of the cyst, thereby defining the polarity of the axis. Here we show that the oocyte reaches the posterior of the cyst in two steps. (1) The cyst flattens as it enters region 2b of the germarium to place the two pro-oocytes in the centre of the cyst, where they contact the posterior follicle cells. (2) One cell is selected to become the oocyte and protrudes into the posterior follicle cell layer when the cyst rounds up on entering region 3. During this germ cell rearrangement, the components of the homophilic cadherin adhesion complex, DE-cadherin, Armadillo and alpha-catenin, accumulate along the border between the oocyte and the posterior follicle cells. Furthermore, the positioning of the oocyte requires cadherin-dependent adhesion between these two cell types, since the oocyte is frequently misplaced when DE-cadherin is removed from either the germline or the posterior follicle cells. We conclude that the oocyte reaches the posterior of the germline cyst because it adheres more strongly to the posterior follicle cells than its neighbours during the germ cell rearrangement that occurs as the cyst moves into region 3. The Drosophila anterior-posterior axis therefore becomes polarised by an unusual cadherin-mediated adhesion between a germ cell and mesodermal follicle cells.