Natural environments are represented by local maps of grid cells and place cells that are stitched together. The manner by which transitions between map fragments are generated is unknown. We recorded grid cells while rats were trained in two rectangular compartments, A and B (each 1 m × 2 m), separated by a wall. Once distinct grid maps were established in each environment, we removed the partition and allowed the rat to explore the merged environment (2 m × 2 m). The grid patterns were largely retained along the distal walls of the box. Nearer the former partition line, individual grid fields changed location, resulting almost immediately in local spatial periodicity and continuity between the two original maps. Grid cells belonging to the same grid module retained phase relationships during the transformation. Thus, when environments are merged, grid fields reorganize rapidly to establish spatial periodicity in the area where the environments meet.