The ab initio electronic structure calculations of the Ni2MnGa alloy indicate that the orthorhombic 4O structure exhibits the lowest energy compared to all known martensitic structures. The 4O structure is formed by nanotwin double layers, i.e., oppositely oriented nanotwins consisting of two (101) lattice planes of nonmodulated martensitic structure. It exhibits the lowest occupation of density of states at the Fermi level. The total energy 1.98 meV/atom below the energy of nonmodulated martensite is achieved within structural relaxation by shifting Mn and Ga atoms at the nanotwin boundaries. The same atomic shift can also be found in other martensitic nanotwinned or modulated structures such as 10M and 14M, which indicates the importance of the nanotwin double layer for the stability of these structures. Our discovery shows that the nanotwinning or modulation is a natural property of low-temperature martensitic phases in Ni-Mn-Ga alloys.PACS numbers: 81.30. Kf, 71.15.Nc, 64.60.My Among Heusler alloys, the Ni 2 MnGa is one of the few, which exhibit the unique properties resulting in a giant magnetic field-induced strain (MFIS) in their lowtemperature martensitic phase 1 . The MFIS can reach up to 12 % in case of Co-and Cu-doped Ni 2 MnGa 2 . Important factors enabling the MFIS are large magnetocrystalline anisotropy and extraordinarily high mobility of martensite twin boundaries 3-6 that primarily depends on martensite structure. While at elevated temperature there is a single austenitic phase of Ni 2 MnGa with cubic L2 1 structure, several low-temperature martensitic phases have been observed depending on composition, temperature and applied stress 7-9 . Martensitic phases with orthorhombic or monoclinic structures exhibit modulation of (110) planes in [110] direction with the periodicity of ten or fourteen lattice planes (10M or 14M). The third martensitic phase with nonmodulated (NM) tetragonally distorted L2 1 structure is typical for larger deviation from stoichiometry. In addition, above the martensitic transformation temperature there is a cubic premartensite with the periodicity of six lattice planes (6M) in alloys with small deviation from stoichiometry 10 .Low-temperature instability of L2 1 austenite can be explained by a strong Fermi surface nesting responsible for the phonon softening in [110] direction, which explains structural modulation of 6M premartensite 11-14 . In addition there is also a large Ni-e g peak corresponding to antibonding states right below the Fermi level, E f , in the minority density of states (DOS) channel. Due to the band Jahn-Teller effect the L2 1 cubic structure lowers its symmetry, which pushes the peak above E f resulting in lower energy [15][16][17] . Nonetheless, the precise causes of the variety of observed low temperature martensitic phases and mechanism of intermartensitic transformations between them have not been fully explained yet.Ab initio calculations have been employed to understand modulations in Ni 2 MnGa. Early works used description of 10M and 14M m...