A semiconductor device comprises a memory cell array portion and
peripheral circuit portion, wherein a first insulation film including
elements as main components other than nitrogen fills between the memory
cell gate electrodes of the memory cell array portion, the first
insulation film is formed as a liner on a sidewall of a peripheral gate
electrode of the peripheral circuit portion simultaneously with the
memory cell portion, and a second insulation film including nitrogen as
the main component is formed on the sidewall of the peripheral gate
electrode via the first insulation film, thus enabling not only the
formation of the memory cell portion having high reliability, but also
the formation of a peripheral circuit with good efficiency,
simultaneously, and avoiding gate offset of a peripheral gate.