Phase transformations in solids, usually altering the properties and behavior of materials, have attracted extensive interest in a variety of research fields ranging from materials science, information storage, to geological science. The ability to precisely control phase transformations of a material with high spatial precision represents a key step towards accurately tailoring material properties, yet still is extremely challenging due to the low spatial accuracy of controlling the energy injection into a material. Recent advances in aberration-corrected scanning transmission electron microscope (STEM) allow accurately manipulating a focused sub-Ångström electron beam to scan the samples with atomic resolution, which, if used for stimulating phase transformations in the irradiated materials, paves a way for the precise control of phase transformations at the atomic scale. Here we have used SrNbO3.4 single crystals which were prepared by the floating zone melting technique and steer a focused electron beam irradiating the ion-Thinned SrNbO3.4 TEM foils. We show a successful precise control of phase transformations in SrNbO3.4 at the atomic scale. The SrNbO3.4 phase with a layered perovskite structure, in which slabs of vertex-sharing NbO6 octahedra are interrupted by planes containing excess O atoms, is transformed into the perovskite SrNbO3 phase by electron irradiation. The excess O atoms are squeezed out and the neighboring slabs of vertex-sharing NbO6 octahedra are zipped together. The region of phase transformations can be dedicatedly designed with atomic spatial precision by a careful navigation of the STEM electron beam. The precise control of phase transformations should be very useful for materials design and processing, as well as the fabrication of advanced nanodevices.