A semiconductor device comprising: a semiconductor substrate containing oxygen, wherein an oxygen concentration distribution (Z) in a depth direction of the semiconductor substrate has a high oxygen concentration part on an upper surface-side of the semiconductor substrate, where an oxygen concentration is higher than in a lower surface of the semiconductor substrate , wherein the upper surface-side of the semiconductor substrate is the portion of the semiconductor substrate located between an upper surface and a center (Dc) of the semiconductor substrate in the depth direction (Z), wherein the high oxygen concentration part has a concentration peak in the oxygen concentration distribution, wherein the semiconductor substrate is provided with an active portion and an edge termination structure portion surrounding the active portion , and the active portion is provided with a transistor portion and a diode portion , wherein the transistor portion and the diode portion are alternately arranged in an arrangement direction (X), wherein an upper surface-side lifetime control region is provided continuously in the arrangement direction (X) in the diode portion and in a part of the transistor portion in contact with the diode portion , wherein the upper surface-side lifetime control region is a region including crystal defects, wherein a crystal defect density distribution of said crystal defects in the depth direction (Z) of the semiconductor substrate has an upper surface-side density peak on the upper surface-side of the semiconductor substrate , and the concentration peak is arranged between the upper surface-side density peak and the upper surface of the semiconductor substrate. a semiconductor substrate containing oxygen, wherein an oxygen concentration distribution (Z) in a depth direction of the semiconductor substrate has a high oxygen concentration part on an upper surface-side of the semiconductor substrate, where an oxygen concentration is higher than in a lower surface of the semiconductor substrate , wherein the upper surface-side of the semiconductor substrate is the portion of the semiconductor substrate located between an upper surface and a center (Dc) of the semiconductor substrate in the depth direction (Z), wherein the high oxygen concentration part has a concentration peak in the oxygen concentration distribution, wherein the semiconductor substrate is provided with an active portion and an edge termination structure portion surrounding the active portion , and the active portion is provided with a transistor portion and a diode portion , wherein the transistor portion and the diode portion are alternately arranged in an arrangement direction (X), wherein an upper surface-side lifetime control region is provided continuously in the arrangement direction (X) in the diode portion and in a part of the transistor portion in contact with the diode portion , wherein the upper surface-side lifetime control region is a region including crystal defects, wherein a crystal defect density distribution of said crystal defects in the depth direction (Z) of the semiconductor substrate has an upper surface-side density peak on the upper surface-side of the semiconductor substrate , and the concentration peak is arranged between the upper surface-side density peak and the upper surface of the semiconductor substrate. <EOS>