Tissue invagination drives embryo remodeling and assembly of internal organs during animal development. While the role of actomyosin?mediated apical constriction in initiating inward folding is well established, computational models suggest relaxation of the basal surface as an additional requirement. However, the lack of genetic mutations interfering specifically with basal relaxation has made it difficult to test its requirement during invagination so far. Here we use optogenetics to quantitatively control myosin?II levels at the basal surface of invaginating cells during Drosophila gastrulation. We show that while basal myosin ?II is lost progressively during ventral furrow formation, optogenetics allows the maintenance of pre?invagination levels over time. Quantitative imaging demonstrates that optogenetic activation prior to tissue bending slows down cell elongation and blocks invagination. Activation after cell elongation and tissue bending has initiated inhibits cell shortening and folding of the furrow into a tubelike structure. Collectively, these data demonstrate the requirement of myosin?II polarization and basal relaxation throughout the entire invagination process.