Mammalian embryogenesis is a dynamic process involving gene expression and mechanical forces between proliferating cells. The exact nature of these interactions, which determine the lineage patterning of the trophectoderm and endoderm tissues occurring in a highly regulated manner at precise periods during the embryonic development, is an area of debate. We have developed a computational modeling framework for studying this process, by which the combined effects of mechanical and genetic interactions are analyzed within the context of proliferating cells. At a purely mechanical level, we demonstrate that the perpendicular alignment of the animal-vegetal (a-v) and embryonic-abembryonic (eb-ab) axes is a result of minimizing the total elastic conformational energy of the entire collection of cells, which are constrained by the zona pellucida. The coupling of gene expression with the mechanics of cell movement is important for formation of both the trophectoderm and the endoderm. In studying the formation of the trophectoderm, we contrast and compare quantitatively two hypotheses: (1) The position determines gene expression, and (2) the gene expression determines the position. Our model, which couples gene expression with mechanics, suggests that differential adhesion between different cell types is a critical determinant in the robust endoderm formation. In addition to differential adhesion, two different testable hypotheses emerge when considering endoderm formation: (1) A directional force acts on certain cells and moves them into forming the endoderm layer, which separates the blastocoel and the cells of the inner cell mass (ICM). In this case the blastocoel simply acts as a static boundary. (2) The blastocoel dynamically applies pressure upon the cells in contact with it, such that cell segregation in the presence of differential adhesion leads to the endoderm formation. To our knowledge, this is the first attempt to combine cell-based spatial mechanical simulations with genetic networks to explain mammalian embryogenesis. Such a framework provides the means to test hypotheses in a controlled in silico environment.